Skip to content

Commit a28ad82

Browse files
committed
hotfix from Dan
1 parent f805ec1 commit a28ad82

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

R/layer_add_target_date.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ slather.layer_add_target_date <- function(object, components, workflow, new_data
113113
if (!is.null(object$target_date)) {
114114
target_date <- object$target_date
115115
validate_date(target_date, expected_time_type,
116-
call = expr(layer_add_target_date())
116+
call = rlang::expr(layer_add_target_date())
117117
)
118118
target_date <- coerce_time_type(target_date, expected_time_type)
119119
} else if (

R/utils-latency.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ get_latency <- function(new_data, forecast_date, column, sign_shift, epi_keys_ch
121121
#' a potentially different max_time_value
122122
#' @keywords internal
123123
get_forecast_date_in_layer <- function(this_recipe, workflow_max_time_value, new_data) {
124-
max_time_value <- max(
124+
max_time_value <- as.Date(max(
125125
workflow_max_time_value,
126126
this_recipe$max_time_value,
127127
max(new_data$time_value)
128-
)
128+
))
129129
if (this_recipe %>% recipes::detect_step("adjust_latency")) {
130130
# get the as_of in an `adjust_latency` step, regardless of where
131131
handpicked_forecast_date <- map(

0 commit comments

Comments
 (0)