module Period: sig
.. end
A period is the number of days between two dates.
Arithmetic operations
include Period.S
Constructors
val make : int -> int -> int -> Date_sig.S.t
make year month day
makes a period of the specified length.
val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> Date_sig.S.t
Labelled version of make
.
The default value of each argument is 0
.
val year : int -> Date_sig.S.t
year n
makes a period of n
years.
val month : int -> Date_sig.S.t
month n
makes a period of n
months.
val week : int -> Date_sig.S.t
week n
makes a period of n
weeks.
val day : int -> Date_sig.S.t
day n
makes a period of n
days.
Getters
exception Not_computable
Since 1.04
val nb_days : Date_sig.S.t -> int
Number of days in a period.
Since 1.04
Raises Not_computable
if the number of days is not computable.
val ymd : Date_sig.S.t -> int * int * int
Number of years, months and days in a period.
Since 1.09.0