Equations
- Std.Time.Month.instOrdinalRepr = Std.Time.Internal.Bounded.instRepr
Equations
- Std.Time.Month.instOrdinalBEq = Std.Time.Internal.Bounded.instBEq
Equations
- Std.Time.Month.instOrdinalLE = Std.Time.Internal.Bounded.instLE
Equations
- Std.Time.Month.instOrdinalLT = Std.Time.Internal.Bounded.instLT
Equations
- Std.Time.Month.instOfNatOrdinal = inferInstanceAs (OfNat (Std.Time.Internal.Bounded.LE 1 (1 + ↑11)) n)
Equations
- Std.Time.Month.instInhabitedOrdinal = { default := 1 }
Equations
- Std.Time.Month.instDecidableLeOrdinal = inferInstanceAs (Decidable (x.val ≤ y.val))
Equations
- Std.Time.Month.instDecidableLtOrdinal = inferInstanceAs (Decidable (x.val < y.val))
Equations
- Std.Time.Month.instOffsetBEq = instBEqOfDecidableEq
Quarter
represents a value between 1 and 4, inclusive, corresponding to the four quarters of a year.
Equations
Instances For
Determine the Quarter
by the month.
Equations
- Std.Time.Month.Quarter.ofMonth month = ((Std.Time.Internal.Bounded.LE.sub month 1).ediv 3 Std.Time.Month.Quarter.ofMonth.proof_1).add 1
Instances For
Creates an Offset
from a natural number.
Equations
- Std.Time.Month.Offset.ofNat data = Int.ofNat data
Instances For
Creates an Offset
from an integer.
Equations
- Std.Time.Month.Offset.ofInt data = data
Instances For
The ordinal value representing the month of January.
Equations
Instances For
The ordinal value representing the month of February.
Equations
Instances For
The ordinal value representing the month of March.
Equations
Instances For
The ordinal value representing the month of April.
Equations
Instances For
The ordinal value representing the month of May.
Equations
Instances For
The ordinal value representing the month of June.
Equations
Instances For
The ordinal value representing the month of July.
Equations
Instances For
The ordinal value representing the month of August.
Equations
Instances For
The ordinal value representing the month of September.
Equations
Instances For
The ordinal value representing the month of October.
Equations
Instances For
The ordinal value representing the month of November.
Equations
Instances For
The ordinal value representing the month of December.
Equations
Instances For
Creates an Ordinal
from an integer, ensuring the value is within bounds.
Equations
- Std.Time.Month.Ordinal.ofInt data h = Std.Time.Internal.Bounded.LE.mk data h
Instances For
Creates an Ordinal
from a Nat
, ensuring the value is within bounds.
Equations
- Std.Time.Month.Ordinal.ofNat data h = Std.Time.Internal.Bounded.LE.ofNat' data h
Instances For
Converts a Ordinal
into a Nat
.
Equations
- Std.Time.Month.Ordinal.toNat ⟨Int.ofNat s, property⟩ = s
- Std.Time.Month.Ordinal.toNat ⟨Int.negSucc s, h⟩ = nomatch ⋯
Instances For
Transforms Month.Ordinal
into Second.Offset
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Transforms Month.Ordinal
into Minute.Offset
.
Equations
- Std.Time.Month.Ordinal.toMinutes leap month = Std.Time.Internal.UnitVal.ediv (Std.Time.Month.Ordinal.toSeconds leap month) 60
Instances For
Transforms Month.Ordinal
into Hour.Offset
.
Equations
- Std.Time.Month.Ordinal.toHours leap month = Std.Time.Internal.UnitVal.ediv (Std.Time.Month.Ordinal.toMinutes leap month) 60
Instances For
Transforms Month.Ordinal
into Day.Offset
.
Equations
- Std.Time.Month.Ordinal.toDays leap month = Std.Time.Internal.UnitVal.convert (Std.Time.Month.Ordinal.toSeconds leap month)
Instances For
Gets the number of days in a month.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns the number of days until the month
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Checks if a given day is valid for the specified month and year. For example, 29/02
is valid only
if the year is a leap year.
Equations
- Std.Time.Month.Ordinal.Valid leap month day = (day.val ≤ (Std.Time.Month.Ordinal.days leap month).val)
Instances For
Clips the day to be within the valid range.
Equations
- Std.Time.Month.Ordinal.clipDay leap month day = if day.val > (Std.Time.Month.Ordinal.days leap month).val then Std.Time.Month.Ordinal.days leap month else day
Instances For
Proves that every value provided by a clipDay is a valid day in a year.