isitholiday: Finding out if specified date is a holiday

Description Usage Arguments Details Examples

Description

This function answers the question: Is the specified date a holiday in the specified country and year?

Usage

1
2
isitholiday(dateofinterest = "2018-01-01", country = "US",
  api_key = Sys.getenv("CALENDARINDEX_API_KEY"))

Arguments

dateofinterest

a single date in the format "YYYY-MM-DD".

country

a single ISO 3166 country code from the 'countrycode' dataset in this package.

api_key

personal CalendarIndex API key

Details

This function will return TRUE if the specified date is a holiday in the specified country and year, FALSE if the specified date is not a holiday in the specified country and year.

Examples

1
2
isitholiday("2018-12-31", "US", Sys.getenv("CALENDARINDEX_API_KEY"))
isitholiday("2016-08-06", "AD", api_key = Sys.getenv("CALENDARINDEX_API_KEY"))

ongzuchengmark/holidayplanneR documentation built on May 21, 2019, 10:12 a.m.