Lines Matching refs:month
14 "monthcalendar", "prmonth", "month", "prcal", "calendar",
22 def __init__(self, month):
23 self.month = month
25 return "bad month number %r; must be 1-12" % self.month
39 # Number of days per month (except for February in leap years)
42 # This module used to have hard-coded lists of day and month names, as
110 def weekday(year, month, day):
111 """Return weekday (0-6 ~ Mon-Sun) for year (1970-...), month (1-12),
113 return datetime.date(year, month, day).weekday()
116 def monthrange(year, month):
118 year, month."""
119 if not 1 <= month <= 12:
120 raise IllegalMonthError(month)
121 day1 = weekday(year, month, 1)
122 ndays = mdays[month] + (month == February and isleap(year))
151 def itermonthdates(self, year, month):
153 Return an iterator for one month. The iterator will yield datetime.date
155 dates outside the specified month.
157 date = datetime.date(year, month, 1)
169 if date.month != month and date.weekday() == self.firstweekday:
172 def itermonthdays2(self, year, month):
175 tuples. For days outside the specified month the day number is 0.
177 for i, d in enumerate(self.itermonthdays(year, month), self.firstweekday):
180 def itermonthdays(self, year, month):
183 the specified month the day number is 0.
185 day1, ndays = monthrange(year, month)
195 def monthdatescalendar(self, year, month):
197 Return a matrix (list of lists) representing a month's calendar.
200 dates = list(self.itermonthdates(year, month))
203 def monthdays2calendar(self, year, month):
205 Return a matrix representing a month's calendar.
207 (day number, weekday number) tuples. Day numbers outside this month
210 days = list(self.itermonthdays2(year, month))
213 def monthdayscalendar(self, year, month):
215 Return a matrix representing a month's calendar.
216 Each row represents a week; days outside this month are zero.
218 days = list(self.itermonthdays(year, month))
224 value is a list of month rows. Each month row contains up to width months.
225 Each month contains between 4 and 6 weeks and each week contains 1-7
238 (day number, weekday number) tuples. Day numbers outside this month are
251 Day numbers outside this month are zero.
306 Return a formatted month name.
315 Print a month's calendar.
321 Return a month's calendar string (multi-line).
390 return '<td class="noday"> </td>' # day outside month
416 Return a month name as a table row.
422 return '<tr><th colspan="7" class="month">%s</th></tr>' % s
426 Return a formatted month as a table.
430 a('<table border="0" cellpadding="0" cellspacing="0" class="month">')
505 month and weekday names in the specified locale. If this locale includes
506 an encoding all strings containing month and weekday names will be returned
540 month and weekday names in the specified locale. If this locale includes
541 an encoding all strings containing month and weekday names will be returned
564 return '<tr><th colspan="7" class="month">%s</th></tr>' % s
586 month = c.formatmonth
591 # Spacing of month columns for multi-column year calendar
613 year, month, day, hour, minute, second = tuple[:6]
614 days = datetime.date(year, month, 1).toordinal() - _EPOCH_ORD + day - 1
623 parser = optparse.OptionParser(usage="usage: %prog [options] [year [month]]")
652 help="locale to be used from month and weekday names"