Documentation

Std.Time.Date.Unit.Day

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

Equations
    Instances For

      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
          @[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.

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

              Equations
                Instances For
                  Equations
                    Equations
                      @[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) :
                      OfYear leap

                      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
                          instance Std.Time.Day.Ordinal.instOfNatOfYear {leap : Bool} {n : Nat} :
                          OfNat (OfYear leap) n
                          Equations
                            @[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.

                                Equations
                                  Instances For
                                    @[inline]

                                    Converts an Ordinal to an Offset.

                                    Equations
                                      Instances For

                                        Converts an OfYear ordinal to a Offset.

                                        Equations
                                          Instances For
                                            @[inline]
                                            def Std.Time.Day.Offset.toOrdinal (off : Offset) (h : off.val 1 off.val 31) :

                                            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.

                                                    Equations
                                                      Instances For
                                                        @[inline]

                                                        Convert Day.Offset into Nanosecond.Offset.

                                                        Equations
                                                          Instances For
                                                            @[inline]

                                                            Convert Nanosecond.Offset into Day.Offset.

                                                            Equations
                                                              Instances For
                                                                @[inline]

                                                                Convert Day.Offset into Millisecond.Offset.

                                                                Equations
                                                                  Instances For
                                                                    @[inline]

                                                                    Convert Millisecond.Offset into Day.Offset.

                                                                    Equations
                                                                      Instances For
                                                                        @[inline]

                                                                        Convert Day.Offset into Second.Offset.

                                                                        Equations
                                                                          Instances For
                                                                            @[inline]

                                                                            Convert Second.Offset into Day.Offset.

                                                                            Equations
                                                                              Instances For
                                                                                @[inline]

                                                                                Convert Day.Offset into Minute.Offset.

                                                                                Equations
                                                                                  Instances For
                                                                                    @[inline]

                                                                                    Convert Minute.Offset into Day.Offset.

                                                                                    Equations
                                                                                      Instances For
                                                                                        @[inline]

                                                                                        Convert Day.Offset into Hour.Offset.

                                                                                        Equations
                                                                                          Instances For
                                                                                            @[inline]

                                                                                            Convert Hour.Offset into Day.Offset.

                                                                                            Equations
                                                                                              Instances For