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 QAA02187; Mon, 15 Sep 2003 16:37:20 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA11555 for ; Mon, 15 Sep 2003 16:37:19 +0200 (MET DST) Received: from jamlikhet.polytechnique.org (b.mx.polytechnique.org [129.104.30.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h8FEbIf27924 for ; Mon, 15 Sep 2003 16:37:18 +0200 (MET DST) Received: from alan-schm1p.inria.fr (DHCP12-8.CIS.UPENN.EDU [158.130.13.28]) by ssl.polytechnique.org (Postfix) with ESMTP id B8C6CB6B0 for ; Mon, 15 Sep 2003 16:37:17 +0200 (CEST) Received: by alan-schm1p.inria.fr (Postfix, from userid 501) id 7028440F7; Mon, 15 Sep 2003 10:37:08 -0400 (EDT) Date: Mon, 15 Sep 2003 10:37:08 -0400 From: Alan Schmitt To: caml-list@inria.fr Subject: [Caml-list] date manipulation library Message-ID: <20030915143708.GK2354@alan-schm1p> Mail-Followup-To: caml-list@inria.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: Vim http://vim.sf.net/ X-Info: http://pauillac.inria.fr/~aschmitt/ X-Operating-System: Linux/2.4.21-6mdk (i686) X-Uptime: 10:29:50 up 1 day, 3:22, 4 users, load average: 0.17, 0.27, 0.18 User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; ocamlnet:01 float:02 precisely:02 hack:03 library:03 library:03 tricky:06 function:09 something:09 weeks:87 convert:12 convert:12 looked:12 writing:13 schmitt:13 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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)). Alan Schmitt -- The hacker: someone who figured things out and made something cool happen. ------------------- 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