MCPcopy Index your code
hub / github.com/python/cpython / monthdatescalendar

Method monthdatescalendar

Lib/calendar.py:293–299  ·  view source on GitHub ↗

Return a matrix (list of lists) representing a month's calendar. Each row represents a week; week entries are datetime.date values.

(self, year, month)

Source from the content-addressed store, hash-verified

291 yield y, m, d, (self.firstweekday + i) % 7
292
293 def monthdatescalendar(self, year, month):
294 """
295 Return a matrix (list of lists) representing a month's calendar.
296 Each row represents a week; week entries are datetime.date values.
297 """
298 dates = list(self.itermonthdates(year, month))
299 return [ dates[i:i+7] for i in range(0, len(dates), 7) ]
300
301 def monthdays2calendar(self, year, month):
302 """

Callers 1

yeardatescalendarMethod · 0.95

Calls 2

itermonthdatesMethod · 0.95
listClass · 0.85

Tested by

no test coverage detected