Date #
A year-mont-day date. Used by Lake's TOML parser and its toolchain version parser (for nightlies).
Equations
- Lake.instInhabitedDate = { default := { year := default, month := default, day := default } }
Equations
Equations
- Lake.instOrdDate = { compare := Lake.ordDate✝ }
Equations
- Lake.instReprDate = { reprPrec := Lake.reprDate✝ }
Equations
- Lake.Date.maxDay y m = if m = 2 then if Lake.Date.IsLeapYear y then 29 else 28 else if m ≤ 7 then 30 + m % 2 else 31 - m % 2
Instances For
@[reducible, inline]
Equations
- Lake.Date.IsValidDay y m d = (d ≥ 1 ∧ d ≤ Lake.Date.maxDay y m)
Instances For
Equations
- Lake.Date.ofValid? year month day = do guard (Lake.Date.IsValidMonth month ∧ Lake.Date.IsValidDay year month day) pure { year := year, month := month, day := day }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.Date.instToString = { toString := Lake.Date.toString }