Пример #1
0
 def FirstDayOfWeek(self, targetDate):
     """
     rewind the selected date to the previous specified date
     
     Unfortunately, firstDayOfWeek has sunday = 1, and weekday()
     has monday=0, so they're actually off by 2!
     """
     return getCalendarRange(targetDate, 'week', self.firstDayOfWeek)[0]
Пример #2
0
 def FirstDayOfWeek(self, targetDate):
     """
     rewind the selected date to the previous specified date
     
     Unfortunately, firstDayOfWeek has sunday = 1, and weekday()
     has monday=0, so they're actually off by 2!
     """
     return getCalendarRange(targetDate, 'week', self.firstDayOfWeek)[0]
Пример #3
0
 def InMonth(self, dt):
     start, end = getCalendarRange(self.selectedDate, 'multiweek',
                                   self.firstDayOfWeek)
     return start <= dt < end
Пример #4
0
 def InMonth(self, dt):
     start, end = getCalendarRange(self.selectedDate, 'multiweek',
                                   self.firstDayOfWeek)
     return start <= dt < end