Documentation

Std.Time.Time.Unit.Hour

Offset represents an offset in hours, defined as an Int. This can be used to express durations or differences in hours.

Equations
Instances For
@[inline]
def Std.Time.Hour.Ordinal.ofInt (data : Int) (h : 0 data data 23) :

Creates an Ordinal from an integer, ensuring the value is within bounds.

Equations

Converts an Ordinal into a relative hour in the range of 1 to 12.

Equations

Converts an Ordinal into a 1-based hour representation within the range of 1 to 24.

Equations
  • One or more equations did not get rendered due to their size.
@[inline]
def Std.Time.Hour.Ordinal.ofNat (data : Nat) (h : data 23) :

Creates an Ordinal from a natural number, ensuring the value is within the valid bounds for hours.

Equations
@[inline]

Converts an Ordinal to an Offset, which represents the duration in hours as an integer value.

Equations
  • ordinal.toOffset = { val := ordinal.val }
@[inline]

Creates an Offset from a natural number.

Equations
@[inline]

Creates an Offset from an integer.

Equations