def _days_before_year(year):
 y = (year - 1)
 return ((((y * 365) + (y // 4)) - (y // 100)) + (y // 400))

def _days_before_year ( year ) : y = ( year - 1 ) return ( ( ( ( y * 365 ) + ( y // 4 ) ) - ( y // 100 ) ) + ( y // 400 ) )
year -> number of days before january 1st of year .