Learn R Programming

openholidaysR (version 0.1.0)

oh_school_holidays: Get school holidays for a given country and time period

Description

This function retrieves school holidays from the OpenHolidays API for a specified country within a given date range.

Usage

oh_school_holidays(
  country,
  language = "EN",
  start_date,
  end_date,
  subdivision = NULL
)

Value

A data frame of school holidays.

Arguments

country

Country ISO code (e.g., "DE").

language

Language code (default: "EN").

start_date

Start date in YYYY-MM-DD format.

end_date

End date in YYYY-MM-DD format.

subdivision

Optional subdivision ID (if you want holidays for a specific subdivision such as state/province).

Examples

Run this code
if (FALSE) { # identical(Sys.getenv("IN_PKGDOWN"), "true")
oh_school_holidays(country = "DE",
                   start_date = "2025-01-01",
                   end_date = "2025-01-31")

oh_school_holidays(country = "DE",
                  start_date = "2025-01-01",
                  end_date = "2025-01-31",
                  subdivision = "DE-BY")
}

Run the code above in your browser using DataLab