Skip to content

Commit

Permalink
Automate get_dd_period
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennit07 committed Dec 13, 2024
1 parent 3ddd70f commit efb8298
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/00-update_refs.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}


Expand Down

0 comments on commit efb8298

Please sign in to comment.