aboutsummaryrefslogtreecommitdiff
path: root/lib/kernel/date_spec.mli
blob: 3fe96252923cca0aff869c4c6210592a0120536c (plain) (blame)
1
2
3
4
5
6
7
8
9
(** A sanctoral entry's date expression. *)
type t = Fixed of { month : int; day : int } [@@deriving sexp]

(** Validates against the leap-year maximum, so 29 February is constructible. *)
val fixed : month:int -> day:int -> (t, string) result

(** [None] when the spec does not occur in that year (29 February in a common
    year) or falls outside the supported domain. *)
val resolve : t -> year:int -> Date.t option