Documentation

Std.Time.Date.Unit.Month

Ordinal represents a bounded value for months, which ranges between 1 and 12.

Equations
Instances For
    Equations

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

    Instances For
      Equations
      • Std.Time.Month.instOfNatOffset = { ofNat := Int.ofNat n }

      Quarter represents a value between 1 and 4, inclusive, corresponding to the four quarters of a year.

      Equations
      Instances For

        Determine the Quarter by the month.

        Instances For
          @[inline]

          Creates an Offset from a natural number.

          Instances For
            @[inline]

            Creates an Offset from an integer.

            Instances For
              @[inline]

              The ordinal value representing the month of January.

              Instances For
                @[inline]

                The ordinal value representing the month of February.

                Equations
                Instances For
                  @[inline]

                  The ordinal value representing the month of March.

                  Instances For
                    @[inline]

                    The ordinal value representing the month of April.

                    Instances For
                      @[inline]

                      The ordinal value representing the month of May.

                      Equations
                      Instances For
                        @[inline]

                        The ordinal value representing the month of June.

                        Equations
                        Instances For
                          @[inline]

                          The ordinal value representing the month of July.

                          Instances For
                            @[inline]

                            The ordinal value representing the month of August.

                            Equations
                            Instances For
                              @[inline]

                              The ordinal value representing the month of September.

                              Equations
                              Instances For
                                @[inline]

                                The ordinal value representing the month of October.

                                Equations
                                Instances For
                                  @[inline]

                                  The ordinal value representing the month of November.

                                  Instances For
                                    @[inline]

                                    The ordinal value representing the month of December.

                                    Equations
                                    Instances For
                                      @[inline]

                                      Converts a Ordinal into a Offset.

                                      Equations
                                      • month.toOffset = month.val
                                      Instances For
                                        @[inline]

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

                                        Instances For
                                          @[inline]
                                          def Std.Time.Month.Ordinal.ofNat (data : Nat) (h : data 1 data 12 := by decide) :

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

                                          Instances For
                                            @[inline]

                                            Converts a Ordinal into a Nat.

                                            Instances For
                                              @[inline]

                                              Creates an Ordinal from a Fin, ensuring the value is within bounds, if its 0 then its converted to 1.

                                              Instances For

                                                Transforms Month.Ordinal into Second.Offset.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For

                                                  Gets the number of days in a month.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For

                                                    Returns the number of days until the month.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      @[reducible, inline]

                                                      Checks if a given day is valid for the specified month and year. For example, 29/02 is valid only if the year is a leap year.

                                                      Equations
                                                      Instances For
                                                        @[inline]

                                                        Clips the day to be within the valid range.

                                                        Equations
                                                        Instances For

                                                          Proves that every value provided by a clipDay is a valid day in a year.