package timedesc

  1. Overview
  2. Docs

Module Timedesc.DateSource

Sourcetype t

Accessors

Sourceval ym : t -> Ym.t
Sourceval year : t -> int
Sourceval month : t -> int
Sourceval day : t -> int
Sourceval iso_week : t -> ISO_week.t
Sourceval iso_year : t -> int
Sourceval weekday : t -> weekday
Sourceval day_of_year : t -> int

Comparison

Sourceval equal : t -> t -> bool
Sourceval lt : t -> t -> bool
Sourceval le : t -> t -> bool
Sourceval gt : t -> t -> bool
Sourceval ge : t -> t -> bool
Sourceval compare : t -> t -> int

Arithmetic

Sourceval add : days:int -> t -> t
Sourceval sub : days:int -> t -> t
Sourceval diff_days : t -> t -> int

Pretty printing

Sourceval pp_rfc3339 : Format.formatter -> t -> unit
Sourceval to_rfc3339 : t -> string

Parsing

Sourceval of_iso8601 : string -> (t, string) result
Sourceval of_iso8601_exn : string -> t

Sexp

Sourceval to_sexp : t -> Sexplib.Sexp.t
Sourceval to_sexp_string : t -> string
Sourceval of_sexp : Sexplib.Sexp.t -> (t, string) result
Sourceval of_sexp_string : string -> (t, string) result
Sourceval pp_sexp : Format.formatter -> t -> unit

Gregorian calendar

Sourcemodule Ymd : sig ... end
Sourceval of_ym : Ym.t -> day:int -> (t, Ymd.error) result
Sourceval of_ym_exn : Ym.t -> day:int -> t

ISO week date calendar

Sourcemodule ISO_week_date : sig ... end
Sourceval of_iso_week : ISO_week.t -> weekday:weekday -> t

ISO ord date calendar

Sourcemodule ISO_ord : sig ... end
OCaml

Innovation. Community. Security.