year, month -> number of days in that month in that year.
(year, month)
| 49 | return y*365 + y//4 - y//100 + y//400 |
| 50 | |
| 51 | def _days_in_month(year, month): |
| 52 | "year, month -> number of days in that month in that year." |
| 53 | assert 1 <= month <= 12, month |
| 54 | if month == 2 and _is_leap(year): |
| 55 | return 29 |
| 56 | return _DAYS_IN_MONTH[month] |
| 57 | |
| 58 | def _days_before_month(year, month): |
| 59 | "year, month -> number of days in year preceding first day of month." |
no test coverage detected