Just FYI I ended up using joda time in a project and it seemed to be a good immutable match for clojure
http://joda-time.sourceforge.net/ - Lachlan On 30 June 2011 06:42, Islon Scherer <islonsche...@gmail.com> wrote: > Thanks for the critic Laurent. > set-date is not destructive, it creates a new date and returns it, the > original is unaltered, > but I agree that the documentation and the function name may be > deceiving, I'll think about a better name and change the docs. > > Islon > > On Jun 29, 5:29 pm, Laurent PETIT <laurent.pe...@gmail.com> wrote: >> Or to be more constructive: >> >> maybe set-date &al should be renamed set-date! ... >> >> ... the more "clojurish" a library will look like, the more >> expectations people will have on it (principle of least surprise) even >> before verifying their assumptions are true (e.g. a "pure clojure" >> library => works with immutable -if not persistent- datastructures) >> >> My 0.02€, >> >> -- >> Laurent >> >> 2011/6/29 Islon Scherer <islonsche...@gmail.com>: >> >> >> >> >> >> >> >> > Hello people. >> > I've created date-clj, a date/time library for clojure. >> > I know there's clj-time already but I was thinking about something >> > less javaish and more like date.js. >> >> > Some examples: >> >> > (date :day 25 :month :november :year 2000) >> > -> #<Date Sat Nov 25 00:00:00 BRST 2000> >> >> > (-> (today) (set-date :month :december :year 1900)) >> > -> #<Date Sat Dec 29 16:44:33 BRST 1900> >> >> > (from-now 1 :year 5 :days) >> > -> #<Date Wed Jul 04 16:44:33 BRST 2012> >> >> > (back 1 :month 200 :minutes) >> > -> #<Date Sun May 29 13:26:33 BRST 2011> >> >> > (following :friday) >> > -> #<Date Fri Jul 01 16:47:17 BRST 2011> >> >> > (-> (today) (is? :friday 13)) >> > -> false >> >> > (-> (back 3 :days) (was? :sunday)) >> > -> true >> >> > (-> (april) sundays first) >> > -> #<Date Sun Apr 03 00:00:00 BRST 2011> >> >> > (-> (following :month) fridays last) >> > -> #<Date Fri Jul 29 00:00:00 BRST 2011> >> >> > (monday) >> > -> #<Date Mon Jun 27 00:00:00 BRST 2011> >> >> > (binding [*locale* (Locale/GERMAN)] (names :week-days)) >> > -> ("Sontag" "Montag" "Dienstag" "Mittwoch" "Donnerstag" "Freitag" >> > "Samstag") >> >> > The project page is:http://github.com/stackoverflow/date-clj >> >> > Critics and ideas are welcome =) >> > Regards, >> > Islon >> >> > -- >> > You received this message because you are subscribed to the Google >> > Groups "Clojure" group. >> > To post to this group, send email to clojure@googlegroups.com >> > Note that posts from new members are moderated - please be patient with >> > your first post. >> > To unsubscribe from this group, send email to >> > clojure+unsubscr...@googlegroups.com >> > For more options, visit this group at >> >http://groups.google.com/group/clojure?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- J Lachlan Kanaley M 0413 191 194 E lachlan.kana...@gmail.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en