Equations
- Std.Time.Week.instOfNatOrdinal = inferInstanceAs (OfNat (Std.Time.Internal.Bounded.LE 1 (1 + ↑52)) n)
Equations
- Std.Time.Week.instDecidableLeOrdinal = inferInstanceAs (Decidable (x.val ≤ y.val))
Equations
- Std.Time.Week.instDecidableLtOrdinal = inferInstanceAs (Decidable (x.val < y.val))
Equations
- Std.Time.Week.instInhabitedOrdinal = { default := 1 }
Offset
represents an offset in weeks.
Equations
- Std.Time.Week.Offset = Std.Time.Internal.UnitVal (86400 * 7)
Instances For
Equations
- Std.Time.Week.instOfNatOffset = { ofNat := Std.Time.Internal.UnitVal.ofNat n }
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
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
Creates an Offset
from a natural number.
Equations
- Std.Time.Week.Offset.ofNat data = { val := ↑data }
Instances For
Creates an Offset
from an integer.
Equations
- Std.Time.Week.Offset.ofInt data = { val := data }
Instances For
Convert Week.Offset
into Millisecond.Offset
.
Equations
- weeks.toMilliseconds = Std.Time.Internal.UnitVal.mul weeks 604800000
Instances For
Convert Millisecond.Offset
into Week.Offset
.
Equations
- Std.Time.Week.Offset.ofMilliseconds millis = Std.Time.Internal.UnitVal.ediv millis 604800000
Instances For
Convert Week.Offset
into Nanosecond.Offset
.
Equations
- weeks.toNanoseconds = Std.Time.Internal.UnitVal.mul weeks 604800000000000
Instances For
Convert Nanosecond.Offset
into Week.Offset
.
Equations
- Std.Time.Week.Offset.ofNanoseconds nanos = Std.Time.Internal.UnitVal.ediv nanos 604800000000000
Instances For
Convert Week.Offset
into Second.Offset
.
Equations
- weeks.toSeconds = Std.Time.Internal.UnitVal.mul weeks 604800
Instances For
Convert Second.Offset
into Week.Offset
.
Equations
- Std.Time.Week.Offset.ofSeconds secs = Std.Time.Internal.UnitVal.ediv secs 604800
Instances For
Convert Week.Offset
into Minute.Offset
.
Equations
- weeks.toMinutes = Std.Time.Internal.UnitVal.mul weeks 10080
Instances For
Convert Minute.Offset
into Week.Offset
.
Equations
- Std.Time.Week.Offset.ofMinutes minutes = Std.Time.Internal.UnitVal.ediv minutes 10080
Instances For
Convert Week.Offset
into Hour.Offset
.
Equations
- weeks.toHours = Std.Time.Internal.UnitVal.mul weeks 168
Instances For
Convert Hour.Offset
into Week.Offset
.
Equations
- Std.Time.Week.Offset.ofHours hours = Std.Time.Internal.UnitVal.ediv hours 168
Instances For
Convert Week.Offset
into Day.Offset
.
Equations
- weeks.toDays = Std.Time.Internal.UnitVal.mul weeks 7