Defines the different eras.
Equations
- Std.Time.Year.instReprEra = { reprPrec := Std.Time.Year.reprEra✝ }
Equations
- Std.Time.Year.instInhabitedEra = { default := Std.Time.Year.Era.bce }
Equations
- Std.Time.Year.instToStringEra = { toString := fun (x : Std.Time.Year.Era) => match x with | Std.Time.Year.Era.bce => "BCE" | Std.Time.Year.Era.ce => "CE" }
Offset
represents a year offset, defined as an Int
.
Equations
Instances For
- Std.Time.Year.instLawfulEqOrdOffset
- Std.Time.Year.instOfNatOffset
- Std.Time.Year.instOffsetAdd
- Std.Time.Year.instOffsetInhabited
- Std.Time.Year.instOffsetLE
- Std.Time.Year.instOffsetLT
- Std.Time.Year.instOffsetNeg
- Std.Time.Year.instOffsetRepr
- Std.Time.Year.instOffsetSub
- Std.Time.Year.instOffsetToString
- Std.Time.Year.instOrdOffset
- Std.Time.Year.instTransOrdOffset
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
- Std.Time.Year.instOfNatOffset = { ofNat := Int.ofNat n }
Equations
@[inline]
Creates an Offset
from a natural number.
Equations
- Std.Time.Year.Offset.ofNat data = Int.ofNat data
@[inline]
Converts the Year
offset to a Month
offset.
Returns the Era
of the Year
.
Equations
- year.era = if year.toInt ≥ 1 then Std.Time.Year.Era.ce else Std.Time.Year.Era.bce
Calculates the number of days in the specified year
.
Equations
- One or more equations did not get rendered due to their size.
Calculates the number of weeks in the specified year
.
Equations
- One or more equations did not get rendered due to their size.
@[reducible, inline]
Checks if the given date is valid for the specified year, month, and day.
Equations
- year.Valid month day = (day ≤ Std.Time.Month.Ordinal.days year.isLeap month)