Sys.Date <- function(mock = NULL) {
if (is_testing()) {
return(as.Date("2022-05-26"))
}
if (is.null(mock)) {
return(as.Date(as.POSIXct(Sys.time())))
}
return(as.Date(mock))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.