Module Time.Period
A period is the number of seconds between two times.
Arithmetic operations
include Period.S
type +'a periodconstraint 'a = [< date_field ]type t= Period.date_field periodType of a period.
Period is an additive monoid
val empty : 'a periodThe empty period.
Periods are comparable
val equal : 'a period -> 'b period -> boolEquality function between two periods.
- see Utils.Comparable.html#VALequal
Utils.Comparable.equal
- since
- 1.09.0
val compare : 'a period -> 'b period -> intComparison function between two periods.
- see Utils.Comparable.html#VALcompare
Utils.Comparable.compare
val hash : 'a period -> intHash function for periods.
- see Utils.Comparable.html#VALhash
Utils.Comparable.hash
- since
- 2.0
Constructors
val make : int -> int -> second -> 'a periodmake hour minute secondmakes a period of the specified length.
val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> 'a periodLabelled version of
make. The default value is0for each argument.
val hour : int -> 'a periodhour nmakes a period ofnhours.
val minute : int -> 'a periodminute nmakes a period ofnminutes.