Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for year, month.
(year, month)
| 120 | |
| 121 | |
| 122 | def monthrange(year, month): |
| 123 | """Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for |
| 124 | year, month.""" |
| 125 | if not 1 <= month <= 12: |
| 126 | raise IllegalMonthError(month) |
| 127 | day1 = weekday(year, month, 1) |
| 128 | ndays = mdays[month] + (month == February and isleap(year)) |
| 129 | return day1, ndays |
| 130 | |
| 131 | |
| 132 | def _monthlen(year, month): |
no test coverage detected