Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Timmy_jsoo.Weekinclude module type of struct include Timmy.Week endA week of a year.
Per ISO 8601 week date system, a week is attributed to the year its Thursday is in.
type js =
< n : Js_of_ocaml.Js.number Js_of_ocaml.Js.readonly_prop
; year : Js_of_ocaml.Js.number Js_of_ocaml.Js.readonly_prop >
Js_of_ocaml.Js.tval make : year:int -> int -> (Timmy.Week.t, string) Result.tmake ~year n is { n; year } if it represents a valid week or a relevant error message otherwise.
val days : Timmy.Week.t -> Timmy.Date.t Base.Sequence.tdays week is the sequence of dates in week in chronological order.
val day : Timmy.Week.t -> Weekday.t -> Timmy.Date.tday week weekday is the weekday of week.
val to_date : Timmy.Week.t -> Timmy.Date.tto_date week is the first day (Monday) of week
val of_date : Timmy.Date.t -> Timmy.Week.tof_date date is the week that includes date
include Base.Comparable.S with type t := tval equal : Timmy.Week.t -> Timmy.Week.t -> boolval compare : Timmy.Week.t -> Timmy.Week.t -> intcompare t1 t2 returns 0 if t1 is equal to t2, a negative integer if t1 is less than t2, and a positive integer if t1 is greater than t2.
val min : Timmy.Week.t -> Timmy.Week.t -> Timmy.Week.tval max : Timmy.Week.t -> Timmy.Week.t -> Timmy.Week.tval ascending : Timmy.Week.t -> Timmy.Week.t -> intascending is identical to compare. descending x y = ascending y x. These are intended to be mnemonic when used like List.sort ~compare:ascending and List.sort ~cmp:descending, since they cause the list to be sorted in ascending or descending order, respectively.
val descending : Timmy.Week.t -> Timmy.Week.t -> intval between : Timmy.Week.t -> low:Timmy.Week.t -> high:Timmy.Week.t -> boolbetween t ~low ~high means low <= t <= high
val clamp_exn :
Timmy.Week.t ->
min:Timmy.Week.t ->
max:Timmy.Week.t ->
Timmy.Week.tclamp_exn t ~min ~max returns t', the closest value to t such that between t' ~low:min ~high:max is true.
Raises if not (min <= max).
val clamp :
Timmy.Week.t ->
min:Timmy.Week.t ->
max:Timmy.Week.t ->
Timmy.Week.t Base__.Or_error.ttype comparator_witness = Timmy.Week.comparator_witnessval comparator :
(Timmy.Week.t, comparator_witness) Base__.Comparator.comparatormodule O = Timmy.Week.OConvenience module to only pull operators.
include module type of Oinclude Base.Comparable.Infix with type t := Timmy__.Week.tval (>=) : Timmy.Week.t -> Timmy.Week.t -> boolval (<=) : Timmy.Week.t -> Timmy.Week.t -> boolval (=) : Timmy.Week.t -> Timmy.Week.t -> boolval (>) : Timmy.Week.t -> Timmy.Week.t -> boolval (<) : Timmy.Week.t -> Timmy.Week.t -> boolval (<>) : Timmy.Week.t -> Timmy.Week.t -> boolval (+) : Timmy.Week.t -> int -> Timmy.Week.ttime + span is the time point span after time.
val pp : Timmy.Week.t Fmt.tpp f week prints week to f in YYYY-NN format, eg. 2021-02.
val to_string : Timmy.Week.t -> stringto_string week is the YYYY-WW representation of week, eg. 2022-03.
val of_string : string -> (Timmy.Week.t, string) Result.tof_string s is the week represented by s as yielded by to_string or a relevant error message if it is invalid.