diff --git a/R/00-update_refs.R b/R/00-update_refs.R index 311bfc21b..ffdbcf912 100644 --- a/R/00-update_refs.R +++ b/R/00-update_refs.R @@ -102,7 +102,13 @@ check_year_valid <- function( #' #' @family initialisation get_dd_period <- function() { - "Jul16_Sep24" + + first_part <- substr(previous_update(), 1, 3) + end_part <- substr(previous_update(), 7, 8) + + dd_period <- as.character(stringr::str_glue('Jul16_{first_part}{end_part}')) + + return(dd_period) }