Documentation

Time.Calendar.MonthDay

def Time.monthLengths (isleap : Bool) :
Equations
  • Time.monthLengths isleap = [(1, 31), (2, if isleap = true then 29 else 28), (3, 31), (4, 30), (5, 31), (6, 30), (7, 31), (8, 31), (9, 30), (10, 31), (11, 30), (12, 31)]
Instances For
    def Time.monthLengths' (isleap : Bool) :
    Equations
    Instances For
      structure Time.Date :

      Date in proleptic Gregorian calendar.

      Instances For
        theorem Time.Date.IsValid (self : Time.Date) :
        ∃ (m : Nat × Nat), m Time.monthLengths (Time.isLeapYear self.Year) m.fst = self.Month.val self.Day.val m.snd
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Date syntactic category

          Equations
          Instances For

            Date from numeric literals year, month and day

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Equations
              Equations
              • One or more equations did not get rendered due to their size.
              Equations
              Instances For
                theorem Time.monthLengths_sum_eq (isleap : Bool) :
                (Time.monthLengths_sum isleap == if isleap = true then 366 else 365) = true
                theorem Time.monthLengths_length_eq_12 (isleap : Bool) :
                ((Time.monthLengths isleap).length == 12) = true
                theorem Time.monthLengths_length_gt_0 (isleap : Bool) :
                0 < (Time.monthLengths isleap).length
                theorem Time.monthLengths_month_in (isleap : Bool) (a : Nat × Nat) :
                a Time.monthLengths isleap1 a.fst a.fst 12
                theorem Time.monthLengths_days_in (isleap : Bool) (a : Nat × Nat) :
                a Time.monthLengths isleap1 a.snd a.snd 31
                theorem Time.list_foldl_init_add {α : Type u_1} (l : List α) (init : Nat) (v : Nat) (f : αNat) :
                List.foldl (fun (acc : Nat) (v : α) => f v + acc) init l + v = List.foldl (fun (acc : Nat) (v : α) => f v + acc) (init + v) l
                Equations
                Instances For
                  theorem Time.monthLengths_month_le_12 (isleap : Bool) (a : Nat × Nat) :
                  a Time.monthLengths isleap1 a.fst a.fst 12
                  theorem Time.monthLengths_days_ge_28 (isleap : Bool) (a : Nat × Nat) :
                  a Time.monthLengths isleap28 a.snd
                  theorem Time.monthLengths_days_le_31 (isleap : Bool) (a : Nat × Nat) :
                  a Time.monthLengths isleapa.snd 31
                  def Time.monthLength' (isLeap : Bool) (month' : Fin 12) :

                  The length of a given month in the Gregorian or Julian calendars.

                  Equations
                  Instances For
                    theorem Time.monthLength'_ge_1 (isLeap : Bool) (month' : Fin 12) :
                    1 Time.monthLength' isLeap month'
                    theorem Time.monthLength'_le_31 (isLeap : Bool) (month' : Fin 12) :
                    Time.monthLength' isLeap month' 31
                    theorem Time.monthAndDayToDayOfYear_gt_zero_of_month_gt (month : Int) (day : Int) (k : Int) (hm : 2 < month) (hk : -2 k) (hd : 0 < day) :
                    0 < (367 * month - 362) / 12 + k + day
                    theorem Time.monthAndDayToDayOfYear_le (month : Int) (day : Int) (k : Int) (hm : month 12) (hk : k = -2 k = -1) (hd2 : day 31) :
                    (367 * month - 362) / 12 + k + day 366
                    theorem Time.days_le_31 (isLeap : Bool) (m : Fin 12) (day : Time.NonemptyIcc 1 (Time.monthLength' isLeap m)) :
                    day.icc.val 31
                    def Time.monthAndDayToDayOfYear (isLeap : Bool) (month : Int) (day : Int) :
                    Time.Icc 1 366

                    Convert month and day in the Gregorian or Julian calendars to day of year.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      def Time.monthAndDayToDayOfYearValid (isLeap : Bool) (month : Int) (day : Int) :

                      Convert month and day in the Gregorian or Julian calendars to day of year option.

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