Browse thread
[Caml-list] date manipulation library
-
Alan Schmitt
- Antoine Schweitzer-Chaput
- Xavier Leroy
- Matthieu Sozeau
- Julien Signoles
- Pierre Weis
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Julien Signoles <Julien.Signoles@l...> |
| Subject: | Re: [Caml-list] date manipulation library |
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 = <abstr> # 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