Return a matrix representing a month's calendar. Each row represents a week; week entries are (day number, weekday number) tuples. Day numbers outside this month are zero.
(self, year, month)
| 299 | return [ dates[i:i+7] for i in range(0, len(dates), 7) ] |
| 300 | |
| 301 | def monthdays2calendar(self, year, month): |
| 302 | """ |
| 303 | Return a matrix representing a month's calendar. |
| 304 | Each row represents a week; week entries are |
| 305 | (day number, weekday number) tuples. Day numbers outside this month |
| 306 | are zero. |
| 307 | """ |
| 308 | days = list(self.itermonthdays2(year, month)) |
| 309 | return [ days[i:i+7] for i in range(0, len(days), 7) ] |
| 310 | |
| 311 | def monthdayscalendar(self, year, month): |
| 312 | """ |