Documentation

Std.Time.Time.Unit.Second

Ordinal represents a bounded value for second, which ranges between 0 and 59 or 60. This accounts for potential leap second.

Instances For
    @[implicit_reducible]
    instance Std.Time.Second.instLEOrdinal {leap : Bool} :
    LE (Ordinal leap)
    @[implicit_reducible]
    instance Std.Time.Second.instLTOrdinal {leap : Bool} :
    LT (Ordinal leap)
    @[implicit_reducible]
    @[implicit_reducible]
    @[implicit_reducible]
    instance Std.Time.Second.instOfNatOrdinal {leap : Bool} {n : Nat} :
    OfNat (Ordinal leap) n
    @[implicit_reducible]
    instance Std.Time.Second.instDecidableLeOrdinal {leap : Bool} {x y : Ordinal leap} :
    @[implicit_reducible]
    instance Std.Time.Second.instDecidableLtOrdinal {leap : Bool} {x y : Ordinal leap} :
    Decidable (x < y)
    @[implicit_reducible]
    @[implicit_reducible]

    Offset represents an offset in seconds. It is defined as an Int.

    Instances For
      @[implicit_reducible]
      @[implicit_reducible]
      @[implicit_reducible]
      @[implicit_reducible]
      @[implicit_reducible]
      @[implicit_reducible]
      @[implicit_reducible]
      @[implicit_reducible]
      @[implicit_reducible]
      @[implicit_reducible]
      @[inline]

      Creates an Second.Offset from a natural number.

      Instances For
        @[inline]

        Creates an Second.Offset from an integer.

        Instances For
          @[inline]
          def Std.Time.Second.Ordinal.ofInt {leap : Bool} (data : Int) (h : 0 data data Int.ofNat (if leap = true then 60 else 59)) :
          Ordinal leap

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

          Instances For
            @[inline]
            def Std.Time.Second.Ordinal.ofNat {leap : Bool} (data : Nat) (h : data if leap = true then 60 else 59) :
            Ordinal leap

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

            Instances For
              @[inline]
              def Std.Time.Second.Ordinal.ofFin {leap : Bool} (data : Fin (if leap = true then 61 else 60)) :
              Ordinal leap

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

              Instances For
                @[inline]
                def Std.Time.Second.Ordinal.toOffset {leap : Bool} (ordinal : Ordinal leap) :

                Converts an Ordinal to an Second.Offset.

                Instances For