is_vacation | R Documentation |
If the date is not in a vacation period, "No vacation" is returned.
is_vacation(date, vacation)
date |
Date (character format) |
vacation |
Dataframe of vacations, same format as set_globals_vars output. |
Vacation description if the day is between two dates, "No vacation" otherwise.
vacation <- data.frame('description' = c('Vacances de Noël'),
start_date = as.POSIXct('2021-12-17 23:00:00'),
end_date = as.POSIXct('2022-01-02 23:00:00'))
is_vacation(as.Date('2022-01-01'), vacation)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.