add error checking for day_of_year and month_day