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 2B0F9BC57 for ; Wed, 3 Nov 2010 16:33:48 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AokBAIsd0UzRVaA2kGdsb2JhbACDIpAPjisIFQEBAQEJCQwHEQMfpGiJIIJTAQWOUAEEgSKDMXOKWYV1 X-IronPort-AV: E=Sophos;i="4.58,289,1286143200"; d="scan'208";a="86005463" Received: from mail-pw0-f54.google.com ([209.85.160.54]) by mail1-smtp-roc.national.inria.fr with ESMTP; 03 Nov 2010 16:33:47 +0100 Received: by pwi8 with SMTP id 8so292651pwi.27 for ; Wed, 03 Nov 2010 08:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=vmy+8MNi9yUdLC88qtkM9jSj1vPzDFrSM+C5k3B9zhU=; b=ENphFMgZi0UOHFz9n+AtJIgRTpoiav8Kv6LhCZWOemQHWmP5SKo3zeioMJzV7YuvCk 99rwUX/meobzJNn2j5axsRbzHkpH8kDLbnQDSXhclMB6bKmk3OfGYWGiXdQaQfpxyoco FqvmWt36FE0TdNiV/ydIb+hflPqNnwLxoATT8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=fGP2LQDYfToZGV7h8rFEP+/zY2P3W6BgT+eFBlDQdRJBsVun6gw9L1ET1pXHAQoqri 9J5L23KwVW1CikIkPheqNMzCHBTq55MTCMHzU3pKcOKpLJlvzJOghZaTeWdR5rEQBcH1 FHe2Pe09pndauOcg8b9gCKX4Q1A+CG6zPDwPQ= MIME-Version: 1.0 Received: by 10.42.225.73 with SMTP id ir9mr4125782icb.118.1288798426140; Wed, 03 Nov 2010 08:33:46 -0700 (PDT) Received: by 10.42.229.1 with HTTP; Wed, 3 Nov 2010 08:33:46 -0700 (PDT) In-Reply-To: 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> Date: Wed, 3 Nov 2010 15:33:46 +0000 Message-ID: Subject: Re: [Caml-list] Re: type inference problem with Printf.sprintf ? From: Benedikt Grundmann To: Sylvain Le Gall Cc: caml-list@inria.fr Content-Type: text/plain; charset=UTF-8 X-Spam: no; 0.00; inference:01 printf:01 sprintf:01 grundmann:01 grundmann:01 ocaml:01 node:01 le-gall:01 lib:01 lib:01 abstr:01 beginner's:01 ocaml:01 bug:01 arlen:98 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 wrote: > 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 > > _______________________________________________ > 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)