Calculate the date of the nth day of the year