View source: R/check_dayoffs.R
| check_dayoffs | R Documentation | 
Check any date or date vector for is an official day off or not.
check_dayoffs(date  = NULL,
              year  = NULL,
              month = NULL,
              day   = NULL,
              cc    = getOption("timeperiodsR.official_day_offs_country"),
              pre   = getOption("timeperiodsR.official_day_offs_pre"),
              include_custom_day_offs = TRUE)
year | 
 Year for check  | 
month | 
 Month for check  | 
day | 
 Month for check.  | 
date | 
 Date, or date vector for checking  | 
cc | 
 Country, one of ru, ua, kz, by  | 
pre | 
 Including shorter working days, 0 or 1  | 
include_custom_day_offs | 
 Including custom dayoffs from options or global variables  | 
Function use 'isDayOff() API'.
For get official day offs for your country you must install httr package and switch options timeperiodsR.official_day_offs to TRUE  or set system variable TPR_DAY_OFFS=TRUE.
Now allow next country:
Russia
Ukraine
Kazakhstan
Belarus
Also you can set default country by options or systen envarible:
timeperiodsR.official_day_offs_country
TPR_COUNTRY
And you can include or exclude shorter working days. Using option timeperiodsR.official_day_offs_pre:
Exclude shorter work days
Include shorter work days
Day marks:
Workday
Day off
Shorten day off
Custom day off
You can set your custom day offs, for example it can be your vacation. Using option timeperiodsR.custom_day_offs or system variable TPR_CUSTOM_DAY_OFFS. In TPR_CUSTOM_DAY_OFFS you can set custom day offs like comma or semicolon list of dates in format YYYY-MM-DD.
Named vector with date and marks
Alexey Seleznev
Official documentation for isDayOff API
ld <- next_n_weeks(n = 2)
check_dayoffs(date = ld)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.