package calendar

  1. Overview
  2. Docs
type field = Period.date_field
type -'a date = 'a Date.date constraint 'a = [< field ]
type t = field date
type day = Date.day =
  1. | Sun
  2. | Mon
  3. | Tue
  4. | Wed
  5. | Thu
  6. | Fri
  7. | Sat
type month = Date.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
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 ... 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
OCaml

Innovation. Community. Security.