module Period:sig..end
A period is the number of days between two dates.
type +[< Date_sig.S.field ] p
include Period.S
val make : int -> int -> int -> Date_sig.S.tmake year month day makes a period of the specified length.
val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> Date_sig.S.tLabelled version of make.
The default value of each argument is 0.
val year : int -> [< Date_sig.S.field > `Year ] periodyear n makes a period of n years.
val month : int -> [< Date_sig.S.field > `Month `Year ] periodmonth n makes a period of n months.
val week : int -> [< Date_sig.S.field > `Day `Week ] periodweek n makes a period of n weeks.
val day : int -> [< Date_sig.S.field > `Day `Week ] periodday n makes a period of n days.
exception Not_computable
val nb_days : [< Date_sig.S.field ] period -> intDate_sig.S.Period.safe_nb_days insteadNumber of days in a period.
Not_computable if the number of days is not computable.nb_days (year 1) raises Not_computable because a year is
not a constant number of days.nb_days (day 6) returns 6val safe_nb_days : [< `Day | `Week ] period -> intEquivalent to Date_sig.S.Period.nb_days but never raises any exception.
val ymd : [< Date_sig.S.field ] period -> int * int * intNumber of years, months and days in a period.
ymd (make 1 2 3) returns 1, 2, 3.