Time and Date Functions
See: Misha Wolf and Charles Wicksteed, Date and Time Formats, September 15, 1997
exception Parse_error of stringraised when there is an error in strftime or convert's format string
raised when a strftime %-escape is Not Yet Implemented
val weekdayname : int -> stringconvert an integer 0..6 to the name of a weekday (0 = Sunday)
val monthname : int -> stringconvert an integer 0..11 to the name of a month (0 = January)
val gmtime : unit -> Unix.tmgmtime (): return the Greenwich Mean Time (GMT / UTC +0) for now.
val localtime : unit -> Unix.tmlocaltime (): return the localtime for now.
val tz : unit -> int * inttz (): return local timezone as (hours,minutes) offset from zulu.
val strftime : ?tz:(int * int) -> string -> Unix.tm -> stringformat date and time (pure-ocaml implementation of Posix strftime(3))
Bugs:
- Locale-specific escapes are hard-wired to EN_US
%U %V %W escapes are Not Yet Implemented and raise NYI
w3c time format %Y-%m-%dT%H:%M:%S