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

Method monthdayscalendar

Lib/calendar.py:311–317  ·  view source on GitHub ↗

Return a matrix representing a month's calendar. Each row represents a week; days outside this month are zero.

(self, year, month)

Source from the content-addressed store, hash-verified

309 return [ days[i:i+7] for i in range(0, len(days), 7) ]
310
311 def monthdayscalendar(self, year, month):
312 """
313 Return a matrix representing a month's calendar.
314 Each row represents a week; days outside this month are zero.
315 """
316 days = list(self.itermonthdays(year, month))
317 return [ days[i:i+7] for i in range(0, len(days), 7) ]
318
319 def yeardatescalendar(self, year, width=3):
320 """

Callers 1

yeardayscalendarMethod · 0.95

Calls 2

itermonthdaysMethod · 0.95
listClass · 0.85

Tested by

no test coverage detected