package odate
Library
Module
Module type
Parameter
Class
Class type
type tm = {
tm_sec : int;
(*Seconds 0..60
*)tm_min : int;
(*Minutes 0..59
*)tm_hour : int;
(*Hours 0..23
*)tm_mday : int;
(*Day of month 1..31
*)tm_mon : int;
(*Month of year 0..11
*)tm_year : int;
(*Year - 1900
*)tm_wday : int;
(*Day of week (Sunday is 0)
*)tm_yday : int;
(*Day of year 0..365
*)tm_isdst : bool;
(*Daylight time savings in effect
*)
}
Clock operations. Currently read-only to retrieve the time in various formats.
The type representing wallclock time and calendar date.
val gmtime : float -> tm
Convert a time in seconds, as returned by time
, into a date and a time. Assumes UTC (Coordinated Universal Time), also known as GMT.
val localtime : float -> tm
Convert a time in seconds, as returned by time
, into a date and a time. Assumes UTC (Coordinated Universal Time), also known as GMT.
Convert a time in seconds, as returned by Unix.time
, into a date and a time. Assumes the local time zone.
Convert a date and time, specified by the tm argument, into a time in seconds, as returned by Unix.time. The tm_isdst, tm_wday and tm_yday fields of tm are ignored. Also return a normalized copy of the given tm record, with the tm_wday, tm_yday, and tm_isdst fields recomputed from the other fields, and the other fields normalized (so that, e.g., 40 October is changed into 9 November). The tm argument is interpreted in the local time zone.