Learn R Programming

IndonesiAPIs (version 0.1.1)

get_indonesia_holidays: Get Official Public Holidays in Indonesia for a Given Year

Description

Retrieves the list of official public holidays in Indonesia for a specific year using the Nager.Date public holidays API. This function returns a tibble containing the date of the holiday, the name in the local language (Indonesian), and the English name. It is useful for academic, planning, and data analysis purposes. The information is retrieved directly from the Nager.Date API and reflects the current status of holidays for the requested year. The field names returned are consistent with the API structure.

Usage

get_indonesia_holidays(year)

Value

A tibble with the following columns:

  • date: Date of the holiday (class Date)

  • local_name: Holiday name in the local language (Indonesian)

  • name: Holiday name in English

Returns NULL if the API is unavailable or returns an error.

Arguments

year

An integer indicating the year (e.g., 2024 or 2025).

Examples

Run this code
# \donttest{
get_indonesia_holidays(2024)
get_indonesia_holidays(2025)
# }

Run the code above in your browser using DataLab