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.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/datetime.py/_days_before_year