def year_to_day2k(year):
    """ Get the date to number of days since 2000-01-01 of the year start. """
    y__ = year + 4799
    day2k = 365*y__ + y__//4 - 2483321
    if year > 1582:
        day2k += y__//400 - y__//100 + 38
    return day2k