isBizday

0th

Percentile

Business and Holidays

Tests if a date is a business day or not.

Keywords
chron
Usage
isBizday(x, holidays = holidayNYSE(), wday = 1:5)
isHoliday(x, holidays = holidayNYSE(), wday = 1:5)
Arguments
x
an object of class timeDate.
holidays
holiday dates from a holiday calendar. An object of class timeDate.
wday
Specify which days should be considered as weekdays. By default from Mondays to Fridays.
Value

  • a logical vector of the same length as x indicating if a date is a business day, or a holiday, respectively.

Aliases
  • isBizday
  • isHoliday
Examples
## Dates in April, currentYear:
   currentYear = getRmetricsOptions("currentYear")
   tS = timeSequence(
      from = paste(currentYear, "-03-01", sep = ""),
      to = paste(currentYear, "-04-30", sep = ""))
   tS

## Subset Business Days at NYSE:
   holidayNYSE()
   isBizday(tS, holidayNYSE())
   tS[isBizday(tS, holidayNYSE())]
Documentation reproduced from package timeDate, version 3010.98, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.