Lines Matching refs:day
4 default, these calendars have Monday as the first day of the week, and
6 set the first day of the week (0=Monday, 6=Sunday)."""
42 # This module used to have hard-coded lists of day and month names, as
110 def weekday(year, month, day):
112 day (1-31)."""
113 return datetime.date(year, month, day).weekday()
167 # Adding one day could fail after datetime.MAXYEAR
174 Like itermonthdates(), but will yield (day number, weekday number)
175 tuples. For days outside the specified month the day number is 0.
181 yield (date.day, date.weekday())
185 Like itermonthdates(), but will yield day numbers. For days outside
186 the specified month the day number is 0.
192 yield date.day
206 (day number, weekday number) tuples. Day numbers outside this month
237 (day number, weekday number) tuples. Day numbers outside this month are
249 yeardatescalendar()). Entries in the week lists are day numbers.
250 Day numbers outside this month are zero.
271 def formatday(self, day, weekday, width):
273 Returns a formatted day.
275 if day == 0:
278 s = '%2i' % day # right-align single-digit days
287 def formatweekday(self, day, width):
289 Returns a formatted week day name.
295 return names[day][:width].center(width)
381 # CSS classes for the day <td>s
384 def formatday(self, day, weekday):
386 Return a day as a table cell.
388 if day == 0:
389 return '<td class="noday"> </td>' # day outside month
391 return '<td class="%s">%d</td>' % (self.cssclasses[weekday], day)
400 def formatweekday(self, day):
404 return '<th class="%s">%s</th>' % (self.cssclasses[day], day_abbr[day])
515 def formatweekday(self, day, width):
521 name = names[day]
549 def formatweekday(self, day):
551 s = day_abbr[day]
554 return '<th class="%s">%s</th>' % (self.cssclasses[day], s)
612 year, month, day, hour, minute, second = tuple[:6]
613 days = datetime.date(year, month, 1).toordinal() - _EPOCH_ORD + day - 1