Assuming that submissions are made on Mondays, this helper function finds the nearest Monday for which a submission could have been made

calc_submission_due_date(forecast_date, submission_day = "Monday")

Arguments

forecast_date

character vector of dates in 'yyyy-mm-dd' format

submission_day

day when forecasts have to be submitted. Default is Monday.

Value

return character vecor with corresponding submission date

Examples

if (FALSE) {
calc_submission_due_date(Sys.Date() + 0:7)
}