package timedesc

  1. Overview
  2. Docs

Module Timedesc.ISO_weekSource

Sourcetype t
Sourcetype error = [
  1. | `Does_not_exist
  2. | `Invalid_iso_year of int
  3. | `Invalid_iso_week of int
]

Constructors

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

Accessors

Sourceval year_week : t -> int * int
Sourceval year : t -> int
Sourceval week : 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 : weeks:int -> t -> t
Sourceval sub : weeks:int -> t -> t
Sourceval diff_weeks : 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.