rcalendar | R Documentation |
rcalendar()
creates a calendar filled with holidays created from one of the
existing hol_*()
holidays (such as hol_christmas()
) or from a manually
generated holiday created using rholiday()
. That calendar can then be used
as an rschedule with any other alma_*()
function (like alma_in()
), or
with one of the specialized calendar functions, like cal_match()
or
cal_events()
.
rcalendar(...)
... |
One or more holidays created from |
on_earth_day <- yearly() %>%
recur_on_month_of_year("April") %>%
recur_on_day_of_month(22) %>%
rholiday("Earth Day")
cal <- rcalendar(
hol_christmas(),
on_earth_day,
hol_us_independence_day()
)
cal
cal_events(cal, year = 2020:2022)
# Lookup holiday name based on date, if it exists
cal_match(c("2021-12-25", "2021-12-26"), cal)
# Find next holiday
alma_next("2021-12-26", cal)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.