From 374cb2f1673529e13571cb6e1fe11a920f385d02 Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Fri, 27 Sep 2024 15:52:18 -0700 Subject: [PATCH] doc: fix vignettes --- R/layer_add_forecast_date.R | 1 + R/layer_add_target_date.R | 1 + 2 files changed, 2 insertions(+) diff --git a/R/layer_add_forecast_date.R b/R/layer_add_forecast_date.R index 02395f960..3d5ea010b 100644 --- a/R/layer_add_forecast_date.R +++ b/R/layer_add_forecast_date.R @@ -104,6 +104,7 @@ slather.layer_add_forecast_date <- function(object, components, workflow, workflows::extract_preprocessor(workflow)$template, "metadata" )$time_type if (expected_time_type == "week") expected_time_type <- "day" + if (expected_time_type == "integer") expected_time_type <- "year" validate_date( forecast_date, expected_time_type, call = rlang::expr(layer_add_forecast_date()) diff --git a/R/layer_add_target_date.R b/R/layer_add_target_date.R index 9176fb593..094ec8501 100644 --- a/R/layer_add_target_date.R +++ b/R/layer_add_target_date.R @@ -90,6 +90,7 @@ slather.layer_add_target_date <- function(object, components, workflow, workflows::extract_preprocessor(workflow)$template, "metadata" )$time_type if (expected_time_type == "week") expected_time_type <- "day" + if (expected_time_type == "integer") expected_time_type <- "year" if (!is.null(object$target_date)) { target_date <- object$target_date