type error = [
| `Does_not_exist
| `Invalid_iso_year of int
| `Invalid_iso_week of int
]
Constructors
val make : year:int -> week:int -> (t, error) Stdlib.result
val make_exn : year:int -> week:int -> t
Accessors
val year_week : t -> int * int
Comparison
val equal : t -> t -> bool
val compare : t -> t -> int
Arithmetic
val add : weeks:int -> t -> t
val sub : weeks:int -> t -> t
val diff_weeks : t -> t -> int
Pretty-printing
val pp_iso8601 : Stdlib.Format.formatter -> t -> unit
val to_iso8601 : t -> string
Parsing
val of_iso8601 : string -> (t, string) Stdlib.result
val of_iso8601_exn : string -> t