From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA21445; Mon, 15 Sep 2003 20:35:03 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA18317 for ; Mon, 15 Sep 2003 20:35:01 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from vsmtp1.tin.it (vsmtp1.tin.it [212.216.176.221]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h8FIZ0T16096 for ; Mon, 15 Sep 2003 20:35:01 +0200 (MET DST) Received: from dalamar.takhisis.org (80.117.63.206) by vsmtp1.tin.it (7.0.019) id 3F4F1DD400663A14 for caml-list@inria.fr; Mon, 15 Sep 2003 20:35:00 +0200 Received: from fistandantilus.takhisis.org (fistandantilus.takhisis.org [192.168.1.113]) by dalamar.takhisis.org (Postfix) with ESMTP id 77E2DB767 for ; Mon, 15 Sep 2003 20:34:59 +0200 (CEST) Received: by fistandantilus.takhisis.org (Postfix, from userid 3148) id D017E274039; Mon, 15 Sep 2003 20:34:58 +0200 (CEST) Date: Mon, 15 Sep 2003 20:34:58 +0200 From: Stefano Zacchiroli To: caml-list@inria.fr Subject: Re: [Caml-list] date manipulation library Message-ID: <20030915183458.GA6577@fistandantilus.takhisis.org> Mail-Followup-To: caml-list@inria.fr References: <20030915143708.GK2354@alan-schm1p> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; bononia:01 caml-list:01 signoles:01 lri:01 signoles:01 schema:01 generic:01 generic:01 observations:01 val:01 reinventing:01 ocamldefun:01 bononia:01 bool:01 command:98 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Sep 15, 2003 at 05:22:49PM +0200, Julien Signoles wrote: > My calendar library, available at > http://www.lri.fr/~signoles/prog.en.html, allows such a thing. For > example: Really interesting, thanks for this contribution! I'm working on schema implementation and this library turns out to be really handy wrt date/time/periods comparison. I'm interested in releasing a debian package of it, if it's ok for you. I've also some comments on the library, I will be happy to know your position on them: 1) why the timezone setting is global? It's really a non functional approach and it turns out to be very annoying. I would rather prefer to have an optional timezone attached to both time and dates. This could be reflected in an optional parameter of date/time constructors and in destructors to fetch timezones raising exceptions when it's undefined. 2) often user defined pretty printing is needed for time/dates. What about adding more pretty printing functions in addition to the already provided to_string? Implementing a generic pretty printing format which use the "date" unix command format will be fantastic for unix gurus. Just to start a generic destructor function will be great. I'm willing to help working on this changes if you like. Minor observations: - the library isn't on the humps, am I wrong? - there's a wonderful typo (look at the day) :-)))) (* Return [true] if a date is a leap day (i.e. February, 24th of a leap year); [false] otherwise. *) val is_leap_day : t -> bool Thanks for the library, this is the tipical piece of code that thousands of people keep on reinventing! Cheers. P.S. what about ocamldefun? :-) -- Stefano Zacchiroli -- Master in Computer Science @ Uni. Bologna, Italy zack@{cs.unibo.it,debian.org,bononia.it} - http://www.bononia.it/zack/ " I know you believe you understood what you think I said, but I am not sure you realize that what you heard is not what I meant! " -- G.Romney ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners