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 RAA01679; Mon, 15 Sep 2003 17:36:44 +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 RAA04639 for ; Mon, 15 Sep 2003 17:36:43 +0200 (MET DST) Received: from newext.lri.fr (ext.lri.fr [129.175.15.4]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h8FFafT08297 for ; Mon, 15 Sep 2003 17:36:41 +0200 (MET DST) Received: from serveur-mail.lri.fr (serveur-mail [129.175.8.90]) by newext.lri.fr (8.12.9/jtpda-5.4) with ESMTP id h8FFMoqS000274 ; Mon, 15 Sep 2003 17:22:50 +0200 (MEST) Received: from pc8-119.lri.fr (pc8-119 [129.175.8.119]) by serveur-mail.lri.fr (8.11.6p2/jtpda-5.3.2) with ESMTP id h8FFMoI18498 ; Mon, 15 Sep 2003 17:22:50 +0200 (MEST) Received: from localhost ([127.0.0.1]) by pc8-119.lri.fr with esmtp (Exim 3.36 #1 (Debian)) id 19yvBi-0003Kc-00; Mon, 15 Sep 2003 17:22:50 +0200 Date: Mon, 15 Sep 2003 17:22:49 +0200 (MEST) From: Julien Signoles To: Alan Schmitt cc: caml-list@inria.fr Subject: Re: [Caml-list] date manipulation library In-Reply-To: <20030915143708.GK2354@alan-schm1p> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailScanner: Found to be clean X-Loop: caml-list@inria.fr X-Spam: no; 0.00; signoles:01 signoles:01 lri:01 caml-list:01 lri:01 val:01 abstr:01 mcvoy:01 sep:01 precisely:02 string:03 string:03 wrote:03 library:03 library:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, 15 Sep 2003, 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 ? My calendar library, available at http://www.lri.fr/~signoles/prog.en.html, allows such a thing. For example: # open Date;; # let today = today ();; val today : Date.t = # to_string today;; - : string = "2003-9-15" # to_string (add today (Period.month 1));; - : string = "2003-10-15" # to_string (add today (Period.day 12));; - : string = "2003-9-27" Hope this helps, Julien Signoles. -- mailto:Julien.Signoles@lri.fr ; http://www.lri.fr/~signoles "In theory, practice and theory are the same, but in practice they are different" (Larry McVoy) ------------------- 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