year -> number of days before January 1st of year.
(year)
| 49 | return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
| 50 | |
| 51 | def _days_before_year(year): |
| 52 | "year -> number of days before January 1st of year." |
| 53 | y = year - 1 |
| 54 | return y*365 + y//4 - y//100 + y//400 |
| 55 | |
| 56 | def _days_in_month(year, month): |
| 57 | "year, month -> number of days in that month in that year." |
no outgoing calls
no test coverage detected
searching dependent graphs…