Date

`sig
type field = Period.date_field
type -'a date constraint 'a = [< field ]
type t = field date
type day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
type 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 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`