package timedesc

  1. Overview
  2. Docs

Module Timedesc.YmSource

Sourcetype t
Sourcetype error = [
  1. | `Does_not_exist
  2. | `Invalid_year of int
  3. | `Invalid_month of int
]
Sourceexception Error_exn of error

Constructors

Sourceval make : year:int -> month:int -> (t, error) result
Sourceval make_exn : year:int -> month:int -> t

Accessors

Sourceval year : t -> int
Sourceval month : t -> int
Sourceval year_month : t -> int * 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 : ?years:int -> ?months:int -> t -> t
Sourceval sub : ?years:int -> ?months:int -> t -> t
Sourceval diff_months : t -> t -> int

Pretty printing

Sourceval pp_iso8601 : Format.formatter -> t -> unit
Sourceval to_iso8601 : t -> string

Parsing

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

Innovation. Community. Security.