Make.PeriodA period is the number of seconds between two calendars.
type +'a period constraint 'a = [< Period.date_field ]type t = Period.date_field periodType of a period.
val empty : 'a periodThe empty period.
val hash : 'a period -> intHash function for periods.
make year month day hour minute second makes a period of the specified length.
val lmake :
?year:int ->
?month:int ->
?day:int ->
?hour:int ->
?minute:int ->
?second:second ->
unit ->
tLabelled version of make. The default value of each argument is 0.
Those functions have the same behavious as those defined in Date_sig.S.Period.
val year : int -> [> `Year ] periodval month : int -> [> `Year | `Month ] periodval week : int -> [> `Week | `Day ] periodval day : int -> [> `Week | `Day ] periodThose functions have the same behavious as those defined in Time_sig.S.Period.
val hour : int -> [> `Week | `Day ] periodval minute : int -> [> `Week | `Day ] periodval from_date : 'a Date.Period.period -> 'a periodConvert a date period to a calendar period.
val from_time : 'a Time.Period.period -> 'a periodConvert a time period to a calendar period.
val to_date : 'a period -> 'a Date.Period.periodConvert a calendar period to a date period. The fractional time period is ignored. @example to_date (hour 60) is equivalent to Date.Period.days 2.
val to_time : 'a period -> 'a Time.Period.periodConvert a calendar period to a date period.
val safe_to_time : [< `Week | `Day ] as 'a period -> 'a Time.Period.periodEquivalent to to_time but never raises any exception.