package calendar

  1. Overview
  2. Docs
type t
type day =
  1. | Sun
  2. | Mon
  3. | Tue
  4. | Wed
  5. | Thu
  6. | Fri
  7. | Sat
type month =
  1. | Jan
  2. | Feb
  3. | Mar
  4. | Apr
  5. | May
  6. | Jun
  7. | Jul
  8. | Aug
  9. | Sep
  10. | Oct
  11. | Nov
  12. | Dec
type year = int
type field = [
  1. | `Day
  2. | `Month
  3. | `Week
  4. | `Year
]
exception Out_of_bounds
exception Undefined
val make : year -> int -> int -> t
val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
val today : unit -> t
val from_jd : int -> t
val from_mjd : int -> 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 -> year
val to_jd : t -> int
val to_mjd : t -> int
val compare : t -> t -> int
val equal : t -> t -> 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 ... end
val add : t -> Period.t -> t
val sub : t -> t -> Period.t
val rem : t -> Period.t -> t
val next : t -> field -> t
val prev : t -> field -> t
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
OCaml

Innovation. Community. Security.