commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26922] - public static boolean DateUtils.equals(Date dt1, Date dt2) ?
Date Fri, 13 Feb 2004 19:22:11 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26922>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26922

public static boolean DateUtils.equals(Date dt1, Date dt2) ?





------- Additional Comments From sergek@lokitech.com  2004-02-13 19:22 -------
I was going to comment on this, but this actually answers the comment by Brent.
 I suggest DateUtils.equals would test the getTime() method.

long now = System.currentTimeMillis();
java.util.Date date = new java.util.Date(now);
java.util.Date timestamp = new java.sql.Timestamp(now);

DateUtils.equals(date, timestamp) = true
however
ObjectUtils.equals(date, timestamp) = false

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message