(year, month)
return _DAYS_BEFORE_MONTH[month] + (month > 2 and _is_leap(year))
year, month -> number of days in year preceding first day of month.
year, month -> number of days in year preceding first day of month.
year month - > number of days in year preceding first day of month .
def _days_before_month(year, month):
    "year, month -> number of days in year preceding first day of month."
    assert 1 <= month <= 12, 'month must be in 1..12'
    return _DAYS_BEFORE_MONTH[month] + (month > 2 and _is_leap(year))
def _days_before_month ( year , month ) : assert 1 <= month <= 12 , 'month must be in 1..12' return _DAYS_BEFORE_MONTH [ month ] + ( month > 2 and _is_leap ( year ) )