Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Daniele Futtorovic Newsgroups: comp.lang.java.programmer Subject: Re: Searching for a "TimeInterval" type... Date: Thu, 03 Oct 2013 07:57:15 +0200 Organization: A noiseless patient Spider Lines: 30 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 3 Oct 2013 05:57:21 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="b2928e61883b125ef6debc9de7bc3991"; logging-data="5057"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jJ6kbFn96zy31Ik6jrdfL" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: Cancel-Lock: sha1:PsKlfZDb3V1r+PCZ/+NoSDU6caw= Xref: csiph.com comp.lang.java.programmer:25445 On 2013-10-02 16:42, Andreas Leitgeb allegedly wrote: > Thanks to mark, Arne & Sebastian for pointing towards Joda and > future Java 8. It's good to know that this swamp is getting dried, > but I'll probably not hold my breath for it, and I'll probably stay > with Calendar for now, but at least I'm now aware to not fully embrace > it, but only pick minimal functionality from it. I hope I will then be > able to eventually translate to new date-API once Java 8 arrives. > > Also, I actually (unfortunately) do need to represent mixes of units > and a day definitely isn't the same as 86400 seconds. Calendar seems > to support most of what I need. Now, that I know I didn't just miss a > standard class, I'll do my own for the type of intervals I need. (and > it seems to me (after looking at mark's link) as if neither Period nor > Duration fits my bill completely, anyway.) > > Sebastian wrote: >>> >> One nice thing about using Joda would be that your code will stand a >> good chance of being easily portable to the new Data and Time API in the >> upcoming Java 8 release, which is mostly inspired by Joda time. >> Personally, I'd not start anything new based on the current Calendar >> class and its relatives. >> >> -- Sebastian Having worked with with JODA in the past, I *strongly* recommend you made use of it, regardless of the circumstances. -- DF.