Skip to contents

Scraps the site https://www.timeanddate.com to retrieve holidays data.

Usage

get_holidays(country, year, month)

Arguments

country

a character of length 1. The name of the country (e.g. 'France') to retrieve holidays for.

year

either an integer or a character of length 1. Must have 4 characters (e.g. '2024' and not '24').

month

either an integer or a character of length 1. Must have 1 or 2 characters (e.g. '01' or '1'). Default is the current month.

Value

A data.frame with the following columns:

  • date: the date of the holiday (YYYY-MM-DD),

  • name: the name of the holiday (character),

  • type: the category of the holiday (character).

Examples

if (FALSE) {
## Get holidays for France in 2024 ----
get_holidays(country = "France", year = 2024, month = 4)
}