can this code from this question calculating-the-date-from-day-number be changed to accept any year from the past and future?
time_t
#include