Home | History | Annotate | Download | only in python2.7

Lines Matching full:year

97 def isleap(year):
99 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
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."""
121 day1 = weekday(year, month, 1)
122 ndays = mdays[month] + (month == February and isleap(year))
151 def itermonthdates(self, year, month):
157 date = datetime.date(year, month, 1)
172 def itermonthdays2(self, year, month):
177 for date in self.itermonthdates(year, month):
183 def itermonthdays(self, year, month):
188 for date in self.itermonthdates(year, month):
194 def monthdatescalendar(self, year, month):
199 dates = list(self.itermonthdates(year, month))
202 def monthdays2calendar(self, year, month):
209 days = list(self.itermonthdays2(year, month))
212 def monthdayscalendar(self, year, month):
217 days = list(self.itermonthdays(year, month))
220 def yeardatescalendar(self, year, width=3):
222 Return the data for the specified year ready for formatting. The return
228 self.monthdatescalendar(year, i)
233 def yeardays2calendar(self, year, width=3):
235 Return the data for the specified year ready for formatting (similar to
241 self.monthdays2calendar(year, i)
246 def yeardayscalendar(self, year, width=3):
248 Return the data for the specified year ready for formatting (similar to
253 self.monthdayscalendar(year, i)
336 Returns a year's calendar as a multi-line string.
372 """Print a year's calendar."""
444 Return a formatted year as a table of tables.
449 a('<table border="0" cellpadding="0" cellspacing="0" class="year">')
451 a('<tr><th colspan="%d" class="year">%s</th></tr>' % (width, theyear))
466 Return a formatted year as a complete HTML page.
590 # Spacing of month columns for multi-column year calendar
596 """Prints multi-column formatting for year calendars"""
612 year, month, day, hour, minute, second = tuple[:6]
613 days = datetime.date(year, month, 1).toordinal() - _EPOCH_ORD + day - 1
622 parser = optparse.OptionParser(usage="usage: %prog [options] [year [month]]")
683 print cal.formatyearpage(datetime.date.today().year, **optdict)
699 result = cal.formatyear(datetime.date.today().year, **optdict)