getHolidays: Compute holidays or business days
Description
Compute the number of holidays (or business days) between two dates
Usage
getHolidays(from, to, includeWeekends = FALSE, xp = NULL)getBusinessDays(from, to, xp = NULL)
Value
A Date vector with holidays or business days between the given dates
Arguments
- from
A Date object with the start date
- to
A Date object with the end date
- includeWeekends
A boolean indicating if weekends should be included, default
is ‘FALSE’
- xp
An optional calendar object, if missing the default instance is used
Details
This function takes a start and end date and returns a vector of holidays
(or business days) between them according to the active calendar.
Examples
Run this codegetHolidays(Sys.Date(), Sys.Date() + 30)
Run the code above in your browser using DataLab