Browse thread
type inference problem with Printf.sprintf ?
[
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: | Benedikt Grundmann <benedikt.grundmann@g...> |
| Subject: | Re: [Caml-list] Re: type inference problem with Printf.sprintf ? |
core's (http://ocaml.janestreet.com/?q=node/13) Date.t and TZ.t also contain lots of functions that help dealing with dates. On 3 November 2010 14:43, Sylvain Le Gall <sylvain@le-gall.net> wrote: > Hello, > > On 03-11-2010, Gregory Bellier <gregory.bellier@gmail.com> wrote: >> >> What's the point to rely on another lib while the standard lib Unix is >> enough for this simple task? I don't know calendarLib, that's why I ask. But >> it relies on Unix and Sys anyway so maybe it's better to just use Unix. >> > > Calendar (http://calendar.forge.ocamlcore.org/) or CalendarLib helps you > to deal with a lot of details concerning date. Unix is enough, if you > just want the number of seconds between start and stop of a function. If > you want to count weeks or days, you should use Calendar. > >> >> 2010/10/27 Richard Jones <rich@annexia.org> >> >>> On Wed, Oct 27, 2010 at 08:44:10AM +1100, Arlen Cuss wrote: >>> > # open CalendarLib;; >>> > # Calendar.now ();; >>> > - : CalendarLib.Calendar.t = <abstr> >>> > # Printer.Calendar.print "%d/%m/%Y %H:%M:%S\n" (Calendar.now ());; >>> > 26/10/2010 21:43:43 >>> > - : unit = () >>> >>> Even better, use the internationally standardized format for dates: >>> >>> # Printer.Calendar.print "%F %T\n" (Calendar.now ()) ;; >>> 2010-10-27 11:28:59 >>> - : unit = () >>> >>> > > Regards, > Sylvain Le Gall > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- Calvin: I try to make everyone's day a little more surreal. (From Calvin & Hobbes)