Basically if you have 2 date objects (e.g., java.util.Date and java.sql.Timestamp), ObjectUtils.equals() will return that they are not equal even if they represent the same point in time.
Unless someone objects, I was going to add DateUtils.equals(Date d1, Date d2) and the equality check will be what's returned from each date's getTime(). Just as an example:
long now = System.currentTimeMillis(); Date date = new java.util.Date(now); Date ts = new java.sql.Timestamp(now);
ObjectUtils.equals(date, ts) = false; (as of 2.1) DateUtils.equals(date, ts) = true;
Anyone have a different idea or think this is a bad idea?
-- Serge Knystautas President Lokitech >>> software . strategy . design >> http://www.lokitech.com p. 301.656.5501 e. [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]