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.

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

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

                    Equations
                      Instances For
                        @[inline]

                        Creates an Second.Offset from a natural number.

                        Equations
                          Instances For
                            @[inline]

                            Creates an Second.Offset from an integer.

                            Equations
                              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.

                                Equations
                                  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.

                                    Equations
                                      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.

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

                                            Converts an Ordinal to an Second.Offset.

                                            Equations
                                              Instances For