#' @rdname event-date
#' @export
before_date <- function(x, inclusive = FALSE) {
x <- vec_cast_date(x)
vec_assert(x, size = 1L)
test <- function(env) {
test_before(x, current_date(env), inclusive)
}
new_event(
description = glue("Before date: {collapse_and_trim(x)}"),
test = test
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.