package posix-time

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
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;
}

POSIX tm value with seconds 0,61, minutes 0,59, hours 0,23, day of month 0,31, month of year 0,11, years since 1900, day of week 0,6 (Sunday = 0), day of year 0,365 and daylight saving flag. The daylight saving flag is positive if daylight saving is in effect and 0 if not. In case this information is not available, it has a negative value.

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

create tm_sec tm_min tm_hour tm_mday rm_mon tm_year tm_wday tm_yday tm_isdst creates a new time value if the all arguments suffice the aforementioned predicates. Otherwise create will return None.

val compare : t -> t -> int

compare t1 t2 compares the two time values t1 and t2. It returns 0 if t1 is equal to 2, a negative integer if t1 is less than t2, and a positive integer if t1 is greater than t2. compare considers tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec in the given order.

OCaml

Innovation. Community. Security.