Number of days in month m (1–12) of year y.
Equations
- Actus.Util.Date.daysInMonth y 1 = 31
- Actus.Util.Date.daysInMonth y 2 = if Actus.Util.Date.isLeapYear y = true then 29 else 28
- Actus.Util.Date.daysInMonth y 3 = 31
- Actus.Util.Date.daysInMonth y 4 = 30
- Actus.Util.Date.daysInMonth y 5 = 31
- Actus.Util.Date.daysInMonth y 6 = 30
- Actus.Util.Date.daysInMonth y 7 = 31
- Actus.Util.Date.daysInMonth y 8 = 31
- Actus.Util.Date.daysInMonth y 9 = 30
- Actus.Util.Date.daysInMonth y 10 = 31
- Actus.Util.Date.daysInMonth y 11 = 30
- Actus.Util.Date.daysInMonth y 12 = 31
- Actus.Util.Date.daysInMonth y m = 30
Instances For
Days from 1970-01-01 (negative for earlier dates).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Inverse of toEpochDay (Hinnant civil_from_days).
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[implicit_reducible]
Equations
- Actus.Util.Date.instOrdLocalTime = { compare := fun (a b : Actus.Protocol.LocalTime) => compare (Actus.Util.Date.toEpochDay a) (Actus.Util.Date.toEpochDay b) }
@[implicit_reducible]
Equations
- Actus.Util.Date.instLELocalTime = { le := fun (a b : Actus.Protocol.LocalTime) => Actus.Util.Date.toEpochDay a ≤ Actus.Util.Date.toEpochDay b }
@[implicit_reducible]
Equations
- Actus.Util.Date.instLTLocalTime = { lt := fun (a b : Actus.Protocol.LocalTime) => Actus.Util.Date.toEpochDay a < Actus.Util.Date.toEpochDay b }
@[implicit_reducible]
Equations
- Actus.Util.Date.instBEqLocalTime = { beq := fun (a b : Actus.Protocol.LocalTime) => Actus.Util.Date.toEpochDay a == Actus.Util.Date.toEpochDay b }
Weekday, 0 = Sunday … 6 = Saturday (Hinnant weekday_from_days).
Equations
- Actus.Util.Date.weekday d = (if Actus.Util.Date.toEpochDay d ≥ -4 then (Actus.Util.Date.toEpochDay d + 4) % 7 else (Actus.Util.Date.toEpochDay d + 5) % 7 + 6).toNat
Instances For
Add n whole months, clamping the day to the target month's length.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Add n whole days.
Equations
Instances For
Number of months in one ACTUS period unit (Q=3, H=6, Y=12, M=1).
Equations
Instances For
Number of days in one ACTUS period unit (D=1, W=7).
Equations
Instances For
Advance d by n units of the given period (D/W/M/Q/H/Y).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Advance d by one Cycle.
Equations
Instances For
Subtract n whole months (floor division on the month index).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Move d back by n units of the given period (D/W/M/Q/H/Y).
Equations
- One or more equations did not get rendered due to their size.