Module Posix_time2.Tm

POSIX broken-down time structure.

type t = private {
  1. tm_sec : int;
  2. tm_min : int;
  3. tm_hour : int;
  4. tm_mday : int;
  5. tm_mon : int;
  6. tm_year : int;
  7. tm_wday : int;
  8. tm_yday : int;
  9. tm_isdst : int;
}

Broken-down time with fields for seconds 0-60, minutes 0-59, hours 0-23, day of month 1-31, month 0-11, years since 1900, day of week 0-6 (Sunday = 0), day of year 0-365, and daylight saving flag (positive if DST, 0 if not, negative if unknown).

val create : int -> int -> int -> int -> int -> int -> int -> int -> int -> t option

create sec min hour mday mon year wday yday isdst creates a new broken-down time value. Returns None if arguments are invalid.

val compare : t -> t -> int

compare t1 t2 compares two time values considering year, month, day, hour, minute, second in that order.