
Get Official Holidays in Argentina for a Given Year
Source:R/get_argentinian_holidays.R
get_argentinian_holidays.Rd
This function retrieves the list of official holidays in Argentina for a specified year. The data is obtained from the public API at https://api.argentinadatos.com/v1/feriados/. You can append the desired year at the end of the URL. For example: https://api.argentinadatos.com/v1/feriados/2024/ If no year is provided, the function returns holidays for the current year.
Value
A data frame with the following columns:
fecha
: Date of the holiday (character in YYYY-MM-DD format).tipo
: Type of holiday (e.g., "inamovible", "trasladable").nombre
: Name or reason of the holiday.
Details
The function sends a GET request to the ArgentinaDatos API and converts the JSON response into a structured
data frame. It validates the input year and falls back to the current year if none is specified.
If the API does not return a 200 status code, the function will return NULL
and emit a message.