Get all holidays for a given year. Best used for obtaining a list of federal holidays.
Arguments
- year
The year for which holidays should be retrieved, between 2013 and 2038. The default,
NULL, is equivalent to the current year.- federal
A boolean indicating whether only federal holidays should be retrieved. The default,
NULL, is equivalent toFALSE.- optional
A boolean indicating whether optional (non-legislated) holidays should be retrieved. The default,
NULL, is equivalent toFALSE.
Value
A tibble with columns:
- date
<date>The date when the holiday occurs.- observed_date
<date>The date when the holiday is observed (celebrated). For example, if Christmas Day falls on a Sunday, it is observed (celebrated) on the proceeding Monday.- name_en
<chr>The name of the holiday, in English.- name_fr
<chr>The name of the holiday, in French.- federal
<lgl>Whether the holiday is a federal holiday.- holiday_id
<int>The id of the holiday.- provinces
<list>A list of tibbles containing information on the provinces observing the holiday and source links.
Examples
if (interactive()) {
get_holidays()
}
