TOML Date-Time #
Defines data types for representing a TOML date-time. TOML date-times are based on IETF RFC 3339 with some components optionally left out, creating four distinct variants.
- Offset Date-Time: A full RFC 3339 date-time.
- Local Date-Time: An RFC 3339 date-time without the time zone.
- Local Date: The date portion of an RFC 3339 date-time (year-month-day).
- Local Time: The time portion of an RFC 3339 date-time (without time zone).
Equations
- Lake.Toml.lpad s c len = "".pushn c (len - s.length) ++ s
Instances For
Equations
- Lake.Toml.rpad s c len = s.pushn c (len - s.length)
Instances For
Equations
- Lake.Toml.zpad n len = Lake.Toml.lpad (toString n) '0' len
Instances For
Equations
- Lake.Toml.instInhabitedDate = { default := { year := default, month := default, day := default } }
Equations
- Lake.Toml.instOrdDate = { compare := Lake.Toml.ordDate✝ }
Equations
- Lake.Toml.Date.maxDay y m = if m = 2 then if Lake.Toml.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.Toml.Date.IsValidDay y m d = (d ≥ 1 ∧ d ≤ Lake.Toml.Date.maxDay y m)
Instances For
Equations
- Lake.Toml.Date.ofValid? year month day = do guard (Lake.Toml.Date.IsValidMonth month ∧ Lake.Toml.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
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.Toml.Date.instToString = { toString := Lake.Toml.Date.toString }
Equations
- Lake.Toml.instInhabitedTime = { default := { hour := default, minute := default, second := default, fracExponent := default, fracMantissa := default } }
Equations
- Lake.Toml.Time.zero = { hour := 0, minute := 0, second := 0, fracExponent := 0, fracMantissa := 0 }
Instances For
Equations
- Lake.Toml.Time.instOfNat = { ofNat := Lake.Toml.Time.zero }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.Toml.Time.instToString = { toString := Lake.Toml.Time.toString }
A TOML date-time.
- offsetDateTime: Lake.Toml.Date → Lake.Toml.Time → optParam (Option (Bool × Lake.Toml.Time)) none → Lake.Toml.DateTime
- localDateTime: Lake.Toml.Date → Lake.Toml.Time → Lake.Toml.DateTime
- localDate: Lake.Toml.Date → Lake.Toml.DateTime
- localTime: Lake.Toml.Time → Lake.Toml.DateTime
Instances For
Equations
- Lake.Toml.instInhabitedDateTime = { default := Lake.Toml.DateTime.offsetDateTime default default default }
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- (Lake.Toml.DateTime.offsetDateTime d t o?).toString = toString "" ++ toString d ++ toString "T" ++ toString t ++ toString "Z"
- (Lake.Toml.DateTime.localDateTime d t).toString = toString "" ++ toString d ++ toString "T" ++ toString t ++ toString ""
- (Lake.Toml.DateTime.localDate d).toString = d.toString
- (Lake.Toml.DateTime.localTime t).toString = t.toString
Instances For
Equations
- Lake.Toml.DateTime.instToString = { toString := Lake.Toml.DateTime.toString }