package timedesc

  1. Overview
  2. Docs

Module Date.ISO_week_dateSource

Sourcetype view = private {
  1. year : int;
  2. week : int;
  3. weekday : weekday;
}
Sourcetype error = [
  1. | `Does_not_exist
  2. | `Invalid_iso_year of int
  3. | `Invalid_iso_week of int
]
Sourceexception Error_exn of error
Sourceval make : year:int -> week:int -> weekday:weekday -> (t, error) result

Constructs a date in the ISO week calendar.

Returns Error `Invalid_iso_year if year < 0 || 9999 < year.

Returns Error `Invalid_iso_week if week < 1 || week count of year < week.

Sourceval make_exn : year:int -> week:int -> weekday:weekday -> t
Sourceval view : t -> view

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.