Return weekday of first day of month (0-6 ~ Mon-Sun) and number of days (28-31) for year, month.
(year, month)
| 184 | raise IllegalMonthError(month) |
| 185 | |
| 186 | def monthrange(year, month): |
| 187 | """Return weekday of first day of month (0-6 ~ Mon-Sun) |
| 188 | and number of days (28-31) for year, month.""" |
| 189 | _validate_month(month) |
| 190 | day1 = weekday(year, month, 1) |
| 191 | ndays = mdays[month] + (month == FEBRUARY and isleap(year)) |
| 192 | return day1, ndays |
| 193 | |
| 194 | |
| 195 | def _monthlen(year, month): |
no test coverage detected
searching dependent graphs…