Module Calendar_sig.S.Period


module Period: sig .. end
A period is the number of seconds between two calendars.


Arithmetic operations


include Period.S

Constructors


val make : int -> int -> int -> int -> int -> Calendar_sig.S.second -> Calendar_sig.S.t
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:Calendar_sig.S.second -> unit -> Calendar_sig.S.t
Labelled 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 -> Calendar_sig.S.t
See also Date_sig.S.Period.year
val month : int -> Calendar_sig.S.t
See also Date_sig.S.Period.month
val week : int -> Calendar_sig.S.t
See also Date_sig.S.Period.week
val day : int -> Calendar_sig.S.t
See also Date_sig.S.Period.day

Those functions have the same behavious as those defined in .
val hour : int -> Calendar_sig.S.t
See also Time_sig.S.Period.hour
val minute : int -> Calendar_sig.S.t
See also Time_sig.S.Period.minute
val second : Calendar_sig.S.second -> Calendar_sig.S.t
See also Time_sig.S.Period.second

Coercions


val from_date : Date.Period.t -> Calendar_sig.S.t
Convert a date period to a calendar period.
val from_time : Time.Period.t -> Calendar_sig.S.t
Convert a time period to a calendar period.
val to_date : Calendar_sig.S.t -> Date.Period.t
Convert a calendar period to a date period. The fractional time period is ignored.
exception Not_computable
= Date.Period.Not_computable.
Since 1.04
val to_time : Calendar_sig.S.t -> Time.Period.t
Convert a calendar period to a date period.
Since 1.04
Raises Not_computable if the time period is not computable.
val ymds : Calendar_sig.S.t -> int * int * int * Calendar_sig.S.second
Number of years, months, days and seconds in a period.
Since 1.09.0