Skip to content

Commit

Permalink
hotfix from Dan
Browse files Browse the repository at this point in the history
  • Loading branch information
dsweber2 committed Jul 30, 2024
1 parent f805ec1 commit a28ad82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/layer_add_target_date.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ slather.layer_add_target_date <- function(object, components, workflow, new_data
if (!is.null(object$target_date)) {
target_date <- object$target_date
validate_date(target_date, expected_time_type,
call = expr(layer_add_target_date())
call = rlang::expr(layer_add_target_date())
)
target_date <- coerce_time_type(target_date, expected_time_type)
} else if (
Expand Down
4 changes: 2 additions & 2 deletions R/utils-latency.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ get_latency <- function(new_data, forecast_date, column, sign_shift, epi_keys_ch
#' a potentially different max_time_value
#' @keywords internal
get_forecast_date_in_layer <- function(this_recipe, workflow_max_time_value, new_data) {
max_time_value <- max(
max_time_value <- as.Date(max(
workflow_max_time_value,
this_recipe$max_time_value,
max(new_data$time_value)
)
))
if (this_recipe %>% recipes::detect_step("adjust_latency")) {
# get the as_of in an `adjust_latency` step, regardless of where
handpicked_forecast_date <- map(
Expand Down

0 comments on commit a28ad82

Please sign in to comment.