Fixed get_day_of_year block

also made year and day start at the index of one.