Equations
- Std.Time.Week.instOfNatOrdinal = inferInstanceAs (OfNat (Std.Time.Internal.Bounded.LE 1 (1 + ↑52)) n)
Equations
Equations
Equations
- Std.Time.Week.instInhabitedOrdinal = { default := 1 }
Equations
Offset
represents an offset in weeks.
Equations
- Std.Time.Week.Offset = Std.Time.Internal.UnitVal (86400 * 7)
Instances For
Equations
Equations
Equations
Equations
- Std.Time.Week.instOrdOffset = inferInstanceAs (Ord (Std.Time.Internal.UnitVal (86400 * 7)))
@[inline]
Creates an Ordinal
from an integer, ensuring the value is within bounds.
Equations
- Std.Time.Week.Ordinal.ofInt data h = Std.Time.Internal.Bounded.LE.mk data h
Instances For
OfMonth
represents the number of weeks within a month. It ensures that the week is within the
correct bounds—either 1 to 6, representing the possible weeks in a month.
Equations
Instances For
Equations
Equations
- Std.Time.Week.Ordinal.instInhabitedOfMonth = { default := 1 }
@[inline]
Creates an Ordinal
from a natural number, ensuring the value is within bounds.
Equations
- Std.Time.Week.Ordinal.ofNat data h = Std.Time.Internal.Bounded.LE.ofNat' data h
Instances For
@[inline]
Creates an Offset
from a natural number.
Equations
- Std.Time.Week.Offset.ofNat data = { val := ↑data }
Instances For
@[inline]
Creates an Offset
from an integer.
Equations
- Std.Time.Week.Offset.ofInt data = { val := data }
Instances For
@[inline]
Convert Week.Offset
into Nanosecond.Offset
.
Equations
- weeks.toNanoseconds = Std.Time.Internal.UnitVal.cast Std.Time.Week.Offset.toNanoseconds._proof_1✝ (Std.Time.Internal.UnitVal.mul weeks 604800000000000)