commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: [lang] What about Duration class? (org.apache.commons.lang.time)
Date Wed, 25 Jan 2012 22:49:27 GMT
On Wed, Jan 25, 2012 at 4:14 PM, Christian Grobmeier
<> wrote:
> On Wed, Jan 25, 2012 at 9:17 PM, Benedikt Ritter
> <> wrote:
>>> But i found only discussions about duration&  joda-time dated 2004.
>>> (
>>> Now i really need in Duration functionality (especially such as
>>> Duration.parse(String)).
>> I heard about joda-time a while ago. My impression is, that the joda project
>> is not that active anymore (please correct me, if I'm wrong). So I would
>> vouch for additions to lang regarding durations. What I'm also really
>> missing in lang.time is conversation of durations. For example:
>> DurationUtils.convertToMinutes(long seconds).
> Joda Time is imho a great lib. Before a few weeks I replaced all the
> JDK stuff with Joda and it really saved my life. There was a release
> in July 2011 or so and my impression is more this lib is stable and
> does not need many releases. Actually I can't imagine a feature I miss
> in Joda at the moment.
>>> I don't understand the Commons point on this issue.
>>> - Commons Lang doesn't need in own implementation of this
>>> functionality and you suggest use joda-time?
>>> - Commons Lang needs in simple&  lightweight implementation of Duration?
>>> Also i cannot find correspond issue in jira (but Eric Crampton in 2004
>>> wrote about
>>> "Commons Lang task list that there is a need for DateRange/Duration
>>> classes").
>> As you said, it is a while ago, since this was discussed. So let's review
>> this topic again.
>> What are your thoughts?
> Hen (who is mainly behind lang) and Gary already mentioned, they don't
> want to replicate Joda code into [lang]. I don't see any reasons why
> we should do that now. Instead I would prefer to mark the time package
> as deprecated and point users to joda. time does rely on jdk classes
> and as I have found out by own experience, it is dangerous to work
> with them.

If you need any more reasons to use joda-time, consider its primary
author, Stephen Colebourne:

1.  Stephen is a Commons developer in any event; an Apache pedigree is
not reason enough to duplicate his work here, but if we did, the
resulting library would probably look like joda-time!
2.  Stephen is also one of the key experts behind JSR-310 aka
threeten, thus the future of dates and times in Java is already
heavily based on the design of and lessons learned from joda-time.


> Cheers
> Christian
>> Regards
>> Benedikt
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> --
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message