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 RAA13734; Mon, 15 Sep 2003 17:25:13 +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 RAA09184 for ; Mon, 15 Sep 2003 17:25:12 +0200 (MET DST) Received: from mattam.ath.cx (f03v-3-233.d1.club-internet.fr [212.194.38.233]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h8FFPBT07753 for ; Mon, 15 Sep 2003 17:25:12 +0200 (MET DST) Received: (qmail 23688 invoked from network); 15 Sep 2003 15:29:37 -0000 Received: from unknown (HELO mat) (192.168.0.1) by 192.168.0.254 with RC4-MD5 encrypted SMTP; 15 Sep 2003 15:29:37 -0000 From: Matthieu Sozeau Organization: /home To: caml-list@inria.fr Subject: Re: [Caml-list] date manipulation library Date: Mon, 15 Sep 2003 17:25:05 +0200 User-Agent: KMail/1.5.2 References: <20030915143708.GK2354@alan-schm1p> In-Reply-To: <20030915143708.GK2354@alan-schm1p> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200309151725.10617.mattam@altern.org> X-Loop: caml-list@inria.fr X-Spam: no; 0.00; matthieu:01 altern:01 caml-list:01 ocamlnet:01 inference:01 freshmeat:01 freshmeat:01 matthieu:01 ath:99 ocaml:01 caml:01 float:02 precisely:02 wrote:03 hack:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Monday 15 September 2003 16:37, Alan Schmitt wrote: > Hi, Hi! > I am writing an application that needs to manipulate dates. More > precisely, it needs a function that, given a date and a duration (12 > days, 2 weeks, 3 months ...) returns the date at the end of the > duration. Is there a library providing such a thing ? (I have looked at > NetDate in ocamlnet, but I cannot find a way to do it that is not a hack > (convert the date to float, add the number of seconds corresponding to > the duration (tricky in the case of months), and convert back to date > format)). I'm currently writing an i18n library for OCaml (locales, timezones, dates, numbers etc...). It is in early stages of development but date calculations are at the top of my TODO list (i'm actually testing week of month, day of week (...) inference). Maybe you should look at it ? I'm particularly interseted in getting comments and advices from experienced caml developers about this code. freshmeat project page: http://freshmeat.net/projects/ocamli18n/ -- Matthieu Sozeau www: http://mattam.ath.cx ------------------- 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