Home
last modified time | relevance | path

Searched refs:firstweekday (Results 1 – 4 of 4) sorted by relevance

/external/python/cpython2/Lib/
Dcalendar.py132 def __init__(self, firstweekday=0): argument
133 self.firstweekday = firstweekday # 0 = Monday, 6 = Sunday
138 def setfirstweekday(self, firstweekday): argument
139 self._firstweekday = firstweekday
141 firstweekday = property(getfirstweekday, setfirstweekday) variable in Calendar
148 for i in range(self.firstweekday, self.firstweekday + 7):
159 days = (date.weekday() - self.firstweekday) % 7
169 if date.month != month and date.weekday() == self.firstweekday:
177 for i, d in enumerate(self.itermonthdays(year, month), self.firstweekday):
186 days_before = (day1 - self.firstweekday) % 7
[all …]
/external/python/cpython2/Lib/test/
Dtest_calendar.py231 orig = calendar.firstweekday()
233 self.assertEqual(calendar.firstweekday(), calendar.SUNDAY)
235 self.assertEqual(calendar.firstweekday(), calendar.MONDAY)
295 for firstweekday in range(7):
296 cal = calendar.Calendar(firstweekday)
302 cal = calendar.Calendar(firstweekday=3)
307 for firstweekday in range(7):
308 cal = calendar.Calendar(firstweekday)
312 self.assertEqual(days[0][1], firstweekday)
313 self.assertEqual(days[-1][1], (firstweekday - 1) % 7)
[all …]
/external/python/cpython2/Doc/library/
Dcalendar.rst28 .. class:: Calendar([firstweekday])
30 Creates a :class:`Calendar` object. *firstweekday* is an integer specifying the
46 the :attr:`firstweekday` property.
111 .. class:: TextCalendar([firstweekday])
149 .. class:: HTMLCalendar([firstweekday])
180 .. class:: LocaleTextCalendar([firstweekday[, locale]])
190 .. class:: LocaleHTMLCalendar([firstweekday[, locale]])
222 .. function:: firstweekday()
/external/python/cpython2/Demo/tkinter/ttk/
Dttkcalendar.py221 ttkcal = Calendar(firstweekday=calendar.SUNDAY)