| get_province | R Documentation |
Get all holidays for a given year, for a province or territory. Best used to obtain holiday information for a specific province or territory.
get_province(province, year = NULL, optional = NULL)
province |
The two letter abbreviation for a province/territory (case-sensitive). |
year |
The year for which holidays should be retrieved, between 2013 and 2038. The default,
|
optional |
A boolean indicating whether optional (non-legislated) holidays should be
retrieved. The default, |
Province and territory codes:
Alberta: "AB"
British Columbia: "BC"
Manitoba: "MB"
New Brunswick: "NB"
Newfoundland and Labrador: "NL"
Nova Scotia: "NS"
Northwest Territories: "NT"
Nunavut: "NU"
Ontario: "ON"
Prince Edward Island: "PE"
Quebec: "QC"
Saskatchewan: "SK"
Yukon: "YT"
A tibble with columns:
<date> The date when the holiday occurs.
<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.
<chr> The name of the holiday, in English.
<chr> The name of the holiday, in French.
<lgl> Whether the holiday is a federal holiday.
<int> The id of the holiday.
<chr> The abbreviated province/territory code.
<chr> The name of the province/territory, in English.
<chr> The name of the province/territory, in French.
<list> A list containing a link to the information source.
get_holidays(), Canada Holidays API
if (interactive()) {
get_province(province = "ON")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.