Date #
A year-mont-day date. Used by Lake's TOML parser and its toolchain version parser (for nightlies).
A date (year-month-day).
Equations
- Lake.instInhabitedDate = { default := { year := default, month := default, day := default } }
Equations
Equations
- Lake.instReprDate = { reprPrec := Lake.reprDate✝ }
@[reducible, inline]
Equations
- Lake.Date.IsValidMonth m = (m ≥ 1 ∧ m ≤ 12)
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
@[reducible, inline]
Equations
- Lake.Date.IsValidDay y m d = (d ≥ 1 ∧ d ≤ Lake.Date.maxDay y m)
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 }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lake.Date.instToString = { toString := Lake.Date.toString }