Return weekday of first day of month (0-6 ~ Mon-Sun) and number of days (28-31) for year, month.
(year, month)
| 165 | raise IllegalMonthError(month) |
| 166 | |
| 167 | def monthrange(year, month): |
| 168 | """Return weekday of first day of month (0-6 ~ Mon-Sun) |
| 169 | and number of days (28-31) for year, month.""" |
| 170 | _validate_month(month) |
| 171 | day1 = weekday(year, month, 1) |
| 172 | ndays = mdays[month] + (month == FEBRUARY and isleap(year)) |
| 173 | return day1, ndays |
| 174 | |
| 175 | |
| 176 | def _monthlen(year, month): |
no test coverage detected