Calendar.Precise

`sig
module Date :
sig
type field = Period.date_field
type -'a date = 'a Date.date constraint 'a = [< field ]
type t = field date
type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
type month =
Date.month =
Jan
| Feb
| Mar
| Apr
| May
| Jun
| Jul
| Aug
| Sep
| Oct
| Nov
| Dec
type year = int
exception Out_of_bounds
exception Undefined
val make : year -> int -> int -> t
val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
val make_year : int -> [< `Year ] date
val make_year_month : int -> int -> [< `Month | `Year ] date
val today : unit -> t
val from_jd : int -> t
val from_mjd : int -> t
val from_day_of_year : year -> int -> t
val days_in_month : [< field > `Month `Year ] date -> int
val day_of_week : t -> day
val day_of_month : t -> int
val day_of_year : t -> int
val week : t -> int
val month : [< field > `Month ] date -> month
val year : [< field > `Year ] date -> year
val to_jd : t -> int
val to_mjd : t -> int
val equal : [< field ] date -> [< field ] date -> bool
val compare : [< field ] date -> [< field ] date -> int
val hash : [< field ] date -> int
val is_valid_date : year -> int -> int -> bool
val is_leap_day : t -> bool
val is_gregorian : t -> bool
val is_julian : t -> bool
val to_unixtm : t -> Unix.tm
val from_unixtm : Unix.tm -> t
val to_unixfloat : t -> float
val from_unixfloat : float -> t
val to_business : t -> year * int * day
val from_business : year -> int -> day -> t
val int_of_day : day -> int
val day_of_int : int -> day
val int_of_month : month -> int
val month_of_int : int -> month
module Period :
sig
type +'a p = 'a Date.Period.p constraint 'a = [< field ]
type +'a period = 'a p constraint 'a = [< field ]
type t = Period.date_field period
val empty : [< Period.date_field ] period
val add :
([< Period.date_field ] as 'a) period -> 'a period -> 'a period
val sub :
([< Period.date_field ] as 'a) period -> 'a period -> 'a period
val opp : ([< Period.date_field ] as 'a) period -> 'a period
val equal :
[< Period.date_field ] period ->
[< Period.date_field ] period -> bool
val compare :
[< Period.date_field ] period ->
[< Period.date_field ] period -> int
val hash : [< Period.date_field ] period -> int
val make : int -> int -> int -> t
val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> t
val year : int -> [< field > `Year ] period
val month : int -> [< field > `Month `Year ] period
val week : int -> [< field > `Day `Week ] period
val day : int -> [< field > `Day `Week ] period
exception Not_computable
val nb_days : [< field ] period -> int
val safe_nb_days : [< `Day | `Week ] period -> int
val ymd : [< field ] period -> int * int * int
end
val add : ([< field ] as 'a) date -> 'a Period.period -> 'a date
val sub :
([< field ] as 'a) date ->
'a date -> [< field > `Day `Week ] Period.period
val precise_sub : ([< field ] as 'a) date -> 'a date -> Period.t
val rem : ([< field ] as 'a) date -> 'a Period.period -> 'a date
val next : ([< field ] as 'a) date -> 'a -> 'a date
val prev : ([< field ] as 'a) date -> 'a -> 'a date
val is_leap_year : year -> bool
val same_calendar : year -> year -> bool
val days_in_year : ?month:month -> year -> int
val weeks_in_year : year -> int
val week_first_last : int -> year -> t * t
val nth_weekday_of_month : year -> month -> day -> int -> t
val century : year -> int
val millenium : year -> int
val solar_number : year -> int
val indiction : year -> int
val golden_number : year -> int
val epact : year -> int
val easter : year -> t
val carnaval : year -> t
val mardi_gras : year -> t
val ash : year -> t
val palm : year -> t
val easter_friday : year -> t
val easter_saturday : year -> t
val easter_monday : year -> t
val ascension : year -> t
val withsunday : year -> t
val withmonday : year -> t
val corpus_christi : year -> t
end
module Time :
sig
type t = Time.t
type field = [ `Hour | `Minute | `Second ]
type second = int
module Second :
sig
type t = second
val from_int : int -> t
val from_float : float -> t
val to_int : t -> int
val to_float : t -> float
end
val make : int -> int -> second -> t
val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
val now : unit -> t
val midnight : unit -> t
val midday : unit -> t
val convert : t -> Time_Zone.t -> Time_Zone.t -> t
val from_gmt : t -> t
val to_gmt : t -> t
val normalize : t -> t * int
val hour : t -> int
val minute : t -> int
val second : t -> second
val to_seconds : t -> second
val to_minutes : t -> float
val to_hours : t -> float
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val is_pm : t -> bool
val is_am : t -> bool
val from_seconds : second -> t
val from_minutes : float -> t
val from_hours : float -> t
module Period :
sig
type +'a period = 'a Time.Period.period
constraint 'a = [< Period.date_field ]
type t = Period.date_field period
val empty : [< Period.date_field ] period
val add :
([< Period.date_field ] as 'a) period -> 'a period -> 'a period
val sub :
([< Period.date_field ] as 'a) period -> 'a period -> 'a period
val opp : ([< Period.date_field ] as 'a) period -> 'a period
val equal :
[< Period.date_field ] period ->
[< Period.date_field ] period -> bool
val compare :
[< Period.date_field ] period ->
[< Period.date_field ] period -> int
val hash : [< Period.date_field ] period -> int
val length : [< Period.date_field ] period -> second
val mul :
([< Period.date_field ] as 'a) period -> 'a period -> 'a period
val div :
([< Period.date_field ] as 'a) period -> 'a period -> 'a period
val make : int -> int -> second -> [< Period.date_field ] period
val lmake :
?hour:int ->
?minute:int ->
?second:second -> unit -> [< Period.date_field ] period
val hour : int -> [< Period.date_field ] period
val minute : int -> [< Period.date_field ] period
val second : second -> [< Period.date_field ] period
val to_seconds : [< Period.date_field ] period -> second
val to_minutes : [< Period.date_field ] period -> float
val to_hours : [< Period.date_field ] period -> float
end
val add : t -> [< Period.date_field ] Period.period -> t
val sub : t -> t -> [< Period.date_field ] Period.period
val rem : t -> [< Period.date_field ] Period.period -> t
val next : t -> field -> t
val prev : t -> field -> t
end
type t
type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
type month =
Date.month =
Jan
| Feb
| Mar
| Apr
| May
| Jun
| Jul
| Aug
| Sep
| Oct
| Nov
| Dec
type year = Date.year
type second = Time.second
type field = [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
val make : int -> int -> int -> int -> int -> second -> t
val lmake :
year:int ->
?month:int ->
?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
val create : Date.t -> Time.t -> t
val now : unit -> t
val from_jd : float -> t
val from_mjd : float -> t
val convert : t -> Time_Zone.t -> Time_Zone.t -> t
val to_gmt : t -> t
val from_gmt : t -> t
val days_in_month : t -> int
val day_of_week : t -> day
val day_of_month : t -> int
val day_of_year : t -> int
val week : t -> int
val month : t -> month
val year : t -> int
val to_jd : t -> float
val to_mjd : t -> float
val hour : t -> int
val minute : t -> int
val second : t -> second
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val is_leap_day : t -> bool
val is_gregorian : t -> bool
val is_julian : t -> bool
val is_pm : t -> bool
val is_am : t -> bool
val to_unixtm : t -> Unix.tm
val from_unixtm : Unix.tm -> t
val to_unixfloat : t -> float
val from_unixfloat : float -> t
val from_date : Date.t -> t
val to_date : t -> Date.t
val to_time : t -> Time.t
module Period :
sig
type +'a period constraint 'a = [< Period.date_field ]
type t = Period.date_field period
val empty : [< Period.date_field ] period
val add :
([< Period.date_field > `Day `Week ] as 'a) period ->
'a period -> 'a period
val sub :
([< Period.date_field > `Day `Week ] as 'a) period ->
'a period -> 'a period
val opp :
([< Period.date_field > `Day `Week ] as 'a) period -> 'a period
val equal :
[< Period.date_field ] period ->
[< Period.date_field ] period -> bool
val compare :
[< Period.date_field ] period -> [< Period.date_field ] period -> int
val hash : [< Period.date_field ] period -> int
val make : int -> int -> int -> int -> int -> second -> t
val lmake :
?year:int ->
?month:int ->
?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
val year : int -> [< Period.date_field > `Year ] period
val month : int -> [< Period.date_field > `Month `Year ] period
val week : int -> [< Period.date_field > `Day `Week ] period
val day : int -> [< Period.date_field > `Day `Week ] period
val hour : int -> [< Period.date_field > `Day `Week ] period
val minute : int -> [< Period.date_field > `Day `Week ] period
val second : second -> [< Period.date_field > `Day `Week ] period
val from_date :
([< Period.date_field ] as 'a) Date.Period.period -> 'a period
val from_time :
([< Period.date_field ] as 'a) Time.Period.period -> 'a period
val to_date : ([< Date.field ] as 'a) period -> 'a Date.Period.period
exception Not_computable
val to_time :
([< Period.date_field ] as 'a) period -> 'a Time.Period.period
val safe_to_time :
([< `Day | `Week ] as 'a) period -> 'a Time.Period.period
val ymds : [< Period.date_field ] period -> int * int * int * second
end
val add : t -> [< Period.date_field ] Period.period -> t
val sub : t -> t -> [< Period.date_field > `Day `Week ] Period.period
val precise_sub : t -> t -> Period.t
val rem : t -> [< Period.date_field ] Period.period -> t
val next : t -> field -> t
val prev : t -> field -> t
end`