Re: Chrono date library

2009-03-07 Thread Allen Rohner
> > Yes, but any library that requires third-party jars can't be used out of > the box in contrib, and I think a language that doesn't support > date-processing out of the box is at a severe disadvantage. > One of the primary reasons Clojure is on the JVM is to re-use Java libraries. Date & Time

Re: Chrono date library

2009-03-06 Thread Michael Wood
On Fri, Mar 6, 2009 at 9:18 PM, Phil Hagelberg wrote: > > Allen Rohner writes: [...] >> One of the large advantages of Joda is that the API is constructed in >> such a way that it is obvious what will happen. For example, there are >> two ways to specify a duration, an Instant and a Partial. An

Re: Chrono date library

2009-03-06 Thread Phil Hagelberg
Allen Rohner writes: > As far as I can tell, the JSR was approved to go into Java 7, but > there is some risk of them not being done by the deadline. JSR-310 is > a complete re-write, I assume for licensing reasons. Interesting. > One of the large advantages of Joda is that the API is construc

Re: Chrono date library

2009-03-06 Thread Allen Rohner
> > What's the status of this JSR? Is it possible the JDK 7 will include > more palatable date processing capabilities? I think it would be a shame > if external libraries were required to get sane date processing in > Clojure, but if the JDK 7 has potential to fix it, that's encouraging. > As f

Re: Chrono date library

2009-03-05 Thread Phil Hagelberg
Allen Rohner writes: > http://www.ociweb.com/jnb/jnbJul2008.html "As mentioned, one of the > problems with the JDK API is difficulty in calculating the number of > days between two different dates. To learn a bit about how to use Joda > Time, let's see how one can solve that problem a few diff

Re: Chrono date library

2009-03-05 Thread Allen Rohner
On Mar 5, 6:10 pm, Phil Hagelberg wrote: > Allen Rohner writes: > > I strongly recommend that you make sure you understand where and why > > Joda differs from the Java standard lib. If you don't handle the cases > > that Joda already does, you *will* have bugs. > > Interesting. So far everyone

Re: Chrono date library

2009-03-05 Thread Jeffrey Straszheim
I took a brief glance at Joda. It appears they already use immutable objects to a large degree. It looks like *exactly* the sort of library we can just use out of the box, unwrapped. On Thu, Mar 5, 2009 at 6:49 PM, Phil Hagelberg wrote: > > Cosmin Stejerean writes: > > > I like the API so far

Re: Chrono date library

2009-03-05 Thread Phil Hagelberg
Allen Rohner writes: > I strongly recommend that you make sure you understand where and why > Joda differs from the Java standard lib. If you don't handle the cases > that Joda already does, you *will* have bugs. Interesting. So far everyone I've talked to who recommended Joda did so because th

Re: Chrono date library

2009-03-05 Thread Allen Rohner
On Mar 5, 5:49 pm, Phil Hagelberg wrote: > Cosmin Stejerean writes: > > I like the API so far, although I'll probably have to wait for > > timezone support before I can start using this. > > Would love some suggestions on what you'd expect the API to look like > for this. Failing test cases wo

Re: Chrono date library

2009-03-05 Thread Phil Hagelberg
Cosmin Stejerean writes: > I like the API so far, although I'll probably have to wait for > timezone support before I can start using this. Would love some suggestions on what you'd expect the API to look like for this. Failing test cases would be even better. I haven't given it much thought ye

Re: Chrono date library

2009-03-05 Thread Cosmin Stejerean
On Thu, Mar 5, 2009 at 5:08 PM, Phil Hagelberg wrote: > > The code is available in either mine or Phil's github forks of clojure- > > contrib: > > > > http://github.com/cooldude127/clojure-contrib/ > > http://github.com/technomancy/clojure-contrib/ > > > > We'd like to hear opinions and whether p

Re: Chrono date library

2009-03-05 Thread Phil Hagelberg
> The code is available in either mine or Phil's github forks of clojure- > contrib: > > http://github.com/cooldude127/clojure-contrib/ > http://github.com/technomancy/clojure-contrib/ > > We'd like to hear opinions and whether people are willing to admit > this into clojure-contrib. Phil has alrea

Chrono date library

2009-03-05 Thread Matt Moriarity
This was posted about a little while ago, but a great deal more has happened. Basically, Phil Hagelberg and I have been working on a nice little date library for Clojure that doesn't rely on anything but the Java date APIs. Last time I posted about this, a few people brought up Joda time, which we