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)
| 280 | return [ dates[i:i+7] for i in range(0, len(dates), 7) ] |
| 281 | |
| 282 | def monthdays2calendar(self, year, month): |
| 283 | """ |
| 284 | Return a matrix representing a month's calendar. |
| 285 | Each row represents a week; week entries are |
| 286 | (day number, weekday number) tuples. Day numbers outside this month |
| 287 | are zero. |
| 288 | """ |
| 289 | days = list(self.itermonthdays2(year, month)) |
| 290 | return [ days[i:i+7] for i in range(0, len(days), 7) ] |
| 291 | |
| 292 | def monthdayscalendar(self, year, month): |
| 293 | """ |