I've looked at the Joda-Time API and it doesn't look like there's
anything that would be
nearly as efficient as the simple bit-math that's used to do the
calculations in the JDK implementation.
Admittedly I'm not that familiar with the library, so if there is a
better way, I'm open
to being corrected.
Alex Marshall
Software Developer
Email: [EMAIL PROTECTED]
MSN Messenger: [EMAIL PROTECTED]
ICQ: 137350791
Skype username: alex.marshall
Office: 1-888-286-2010 Ext 229
Fax: 1-780-484-0538
------------------------------------------------------------------------
CONFIDENTIAL: This message, including any attachments, may contain
confidential and/or privileged information, which is intended solely for
the use of the addressee(s). Any unauthorized review, use, disclosure,
or distribution is prohibited. If you are not the intended recipient,
please contact the sender and destroy all copies of the original
message.
Gary Gregory (JIRA) wrote:
[ https://issues.apache.org/jira/browse/LANG-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497532 ]
Gary Gregory commented on LANG-335:
-----------------------------------
Would Joda-TIme help here?
Comparisons of Dates and Calendars to second precision
------------------------------------------------------
Key: LANG-335
URL: https://issues.apache.org/jira/browse/LANG-335
Project: Commons Lang
Issue Type: New Feature
Affects Versions: 2.3
Environment: Windows, JDK 1.6.0, Eclipse 3.2
Reporter: Alex Marshall
Priority: Trivial
The o.a.c.lang.time.DateUtils should have functions for comparing dates and
Calendars to only second precision instead of millisecond. The motivation for
this is comparison of dates and Calendars in objects both before and after the
objects have been committed to and retrieved from a database. In theory the
objects should be equal if 'equals' is run on them, but in practice they are
not because the date fields do not have exactly the same millisecond values
after they've been persisted to a database since times in many databases are
only maintained to second-level precision (and without TimeZone information in
many cases, to boot!)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]