Documentation

Std.Time.Date.Unit.Day

Ordinal represents a bounded value for days, which ranges between 1 and 31.

Equations
Instances For
    Equations
    Equations

    Offset represents an offset in days. It is defined as an Int with a base unit of 86400 (the number of seconds in a day).

    Equations
    Instances For
      Equations
      Equations
      Equations
      Equations
      Equations
      @[inline]
      def Std.Time.Day.Ordinal.ofInt (data : Int) (h : 1 data data 31) :

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

      Instances For

        OfYear represents the day ordinal within a year, which can be bounded between 1 and 365 or 366, depending on whether it's a leap year.

        Instances For
          @[inline]
          def Std.Time.Day.Ordinal.OfYear.ofNat {leap : Bool} (data : Nat) (h : data 1 data if leap = true then 366 else 365 := by decide) :

          Creates an ordinal for a specific day within the year, ensuring that the provided day (data) is within the valid range for the year, which can be 1 to 365 or 366 for leap years.

          Equations
          Instances For
            Equations
            Equations
            • Std.Time.Day.Ordinal.instInhabitedOfYear = { default := 1, }
            @[inline]
            def Std.Time.Day.Ordinal.ofNat (data : Nat) (h : data 1 data 31 := by decide) :

            Creates an ordinal from a natural number, ensuring the number is within the valid range for days of a month (1 to 31).

            Equations
            Instances For
              @[inline]

              Creates an ordinal from a Fin value, ensuring it is within the valid range for days of the month (1 to 31). If the Fin value is 0, it is converted to 1.

              Instances For
                @[inline]

                Converts an Ordinal to an Offset.

                Instances For

                  Converts an OfYear ordinal to a Offset.

                  Instances For
                    @[inline]

                    Converts an Offset to an Ordinal.

                    Equations
                    Instances For
                      @[inline]

                      Creates an Offset from a natural number.

                      Equations
                      Instances For
                        @[inline]

                        Creates an Offset from an integer.

                        Instances For
                          @[inline]

                          Convert Day.Offset into Second.Offset.

                          Equations
                          Instances For
                            @[inline]

                            Convert Minute.Offset into Day.Offset.

                            Instances For
                              @[inline]

                              Convert Day.Offset into Hour.Offset.

                              Instances For