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
Sourceval pp_rfc9110 : Format.formatter -> t -> unit
Sourceval to_rfc9110 : t -> string
Sourceval pp_http : Format.formatter -> t -> unit

Alias to pp_rfc9110

Sourceval to_http : t -> string

Alias to to_rfc9110

Parsing

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

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.