Example #1
0
 def decrement_year(date):
     year, month, day = date
     if year > GregorianUtils.from_time(
             GregorianTimeType().get_min_time()[0]).year:
         return self._set_valid_day(year - 1, month, day)
     return date
Example #2
0
 def _select_timetype(self, timetype):
     if timetype == None:
         timetype = GregorianTimeType()
     return timetype
Example #3
0
 def _set_cal_range(self, cal):
     min_date, _ = GregorianTimeType().get_min_time()
     max_date, _ = GregorianTimeType().get_max_time()
     min_date = self.time_to_wx_date(min_date)
     max_date = self.time_to_wx_date(max_date) - wx.DateSpan.Day()
     cal.SetDateRange(min_date, max_date)
Example #4
0
 def get_time_type(self):
     return GregorianTimeType()