Represents a valid date for a given year, considering whether it is a leap year. Example: (2, 29)
is valid only if leap
is true
.
Equations
- Std.Time.ValidDate leap = { val : Std.Time.Month.Ordinal × Std.Time.Day.Ordinal // Std.Time.Month.Ordinal.Valid leap val.fst val.snd }
Instances For
Equations
- Std.Time.instOrdValidDate = { compare := fun (a b : Std.Time.ValidDate leap) => compare a.val b.val }
Transforms a tuple of a Month
and a Day
into a Day.Ordinal.OfYear
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Transforms a Day.Ordinal.OfYear
into a tuple of a Month
and a Day
.
Equations
- Std.Time.ValidDate.ofOrdinal ordinal = Std.Time.ValidDate.ofOrdinal.go✝ ordinal 1 0 ⋯ ⋯