commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <ggreg...@seagullsoftware.com>
Subject RE: [jira] Commented: (LANG-335) Comparisons of Dates and Calendars to second precision
Date Mon, 21 May 2007 20:49:20 GMT
Hello:

I am pointing to Joda-Time in general for date and time issues as it is a comprehensive open
source solution. It is my understanding that we have not enhanced [lang] in this department
because we do not want to end up with a Joda-Time-like component within [lang].

Thank you,
Gary
________________________________
From: Alex Marshall [mailto:alex@myatmonline.com]
Sent: Monday, May 21, 2007 12:01 PM
To: Jakarta Commons Developers List
Subject: Re: [jira] Commented: (LANG-335) Comparisons of Dates and Calendars to second precision

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:        alex@myatmonline.com<mailto:alex@myatmonline.com>

MSN Messenger: am-132@hotmail.com<mailto:am-132@hotmail.com>

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!)







Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message