Equations
- Std.Time.Year.instReprEra = { reprPrec := Std.Time.Year.instReprEra.repr }
Equations
- Std.Time.Year.instReprEra.repr Std.Time.Year.Era.bce prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Std.Time.Year.Era.bce")).group prec✝
- Std.Time.Year.instReprEra.repr Std.Time.Year.Era.ce prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Std.Time.Year.Era.ce")).group prec✝
Instances For
Instances For
Equations
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" }
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
Instances For
@[inline]
Creates an Offset
from an integer.
Equations
- Std.Time.Year.Offset.ofInt data = data
Instances For
@[inline]
Converts the Year
offset to a Month
offset.
Instances For
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
Instances For
Calculates the number of days in the specified year
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Calculates the number of weeks in the specified year
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[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)