package calendar

  1. Overview
  2. Docs

Parameters

module D : Date_sig.S
module T : Time_sig.S

Signature

module Date : sig ... end
module Time : sig ... end
type t
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 = Date.year
type second = Time.second
type field = [
  1. | `Day
  2. | `Hour
  3. | `Minute
  4. | `Month
  5. | `Second
  6. | `Week
  7. | `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 ... 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
OCaml

Innovation. Community. Security.