From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 39DDABC57 for ; Wed, 3 Nov 2010 15:43:16 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQEANIR0UxQW+UMgWdsb2JhbAChZBUBARYiIr5ihUYEilWFdQ X-IronPort-AV: E=Sophos;i="4.58,289,1286143200"; d="scan'208";a="86000473" Received: from lo.gmane.org ([80.91.229.12]) by mail1-smtp-roc.national.inria.fr with ESMTP; 03 Nov 2010 15:43:15 +0100 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PDeYS-0001gl-J3 for caml-list@inria.fr; Wed, 03 Nov 2010 15:43:12 +0100 Received: from avelizy-155-1-76-106.w90-2.abo.wanadoo.fr ([90.2.27.106]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Nov 2010 15:43:12 +0100 Received: from sylvain by avelizy-155-1-76-106.w90-2.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Nov 2010 15:43:12 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: type inference problem with Printf.sprintf ? Date: Wed, 3 Nov 2010 14:43:01 +0000 (UTC) Message-ID: References: <4CC6F9E9.9090003@free.fr> <1288109042.11135.77.camel@bohrium.pps.jussieu.fr> <4CC6FD65.7080603@free.fr> <1288129450.2986.3.camel@asu> <20101027113014.GA31914@annexia.org> X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: avelizy-155-1-76-106.w90-2.abo.wanadoo.fr User-Agent: slrn/pre1.0.0-18 (Linux) X-Spam: no; 0.00; le-gall:01 inference:01 printf:01 sprintf:01 lib:01 lib:01 abstr:01 arlen:98 wrote:01 wrote:01 unix:01 unix:01 standardized:02 sys:03 unit:03 Hello, On 03-11-2010, Gregory Bellier 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 > >> On Wed, Oct 27, 2010 at 08:44:10AM +1100, Arlen Cuss wrote: >> > # open CalendarLib;; >> > # Calendar.now ();; >> > - : CalendarLib.Calendar.t = >> > # 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