caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Benedikt Grundmann <benedikt.grundmann@googlemail.com>
To: Sylvain Le Gall <sylvain@le-gall.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: type inference problem with Printf.sprintf ?
Date: Wed, 3 Nov 2010 15:33:46 +0000	[thread overview]
Message-ID: <AANLkTinSp+kA5p3ztTRP6KWLKkkp=TJzrs9HOGNZjP37@mail.gmail.com> (raw)
In-Reply-To: <slrnid2t7l.r67.sylvain@gallu.homelinux.org>

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)


  reply	other threads:[~2010-11-03 15:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-26 15:55 Emmanuel Dieul
2010-10-26 16:04 ` [Caml-list] " Mathias Kende
2010-10-26 16:10   ` Emmanuel Dieul
2010-10-26 21:44     ` Arlen Cuss
2010-10-27 11:30       ` Richard Jones
2010-11-03 13:47         ` Gregory Bellier
2010-11-03 14:43           ` Sylvain Le Gall
2010-11-03 15:33             ` Benedikt Grundmann [this message]
2010-11-03 16:23               ` [Caml-list] " Dario Teixeira
2010-10-26 21:41 ` [Caml-list] " David Allsopp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTinSp+kA5p3ztTRP6KWLKkkp=TJzrs9HOGNZjP37@mail.gmail.com' \
    --to=benedikt.grundmann@googlemail.com \
    --cc=caml-list@inria.fr \
    --cc=sylvain@le-gall.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).