| isWeekday {fCalendar} | R Documentation |
Tests if a day belongs to the weekend or is a holiday.
isWeekday | Tests if a date is a weekday or not, |
isWeekend | Tests if a date falls on a weekend or not, |
isBizday | Tests if a date is a business day or not, |
isHoliday | Tests if a date is a non-business day or not. |
isWeekday(x) isWeekend(x) isBizday(x, holidays = holidayNYSE()) isHoliday(x, holidays = holidayNYSE())
holidays |
holiday dates from a holiday calendar. An object of class
timeDate.
|
x |
an object of class timeDate.
|
the functions return logical vectors indicating if a date is a business day, or a holiday. Note, that for business and holidays extraction an holiday/business calendar has to be specified.
timeDate.
We also recommend to inspect the help pages for the POSIX time and date
class, ?Dates, and the help pages from the contributed R packages
chron and date.
## Dates in April, currentYear:
tS = timeSequence(
from = paste(currentYear, "-03-01", sep = ""),
to = paste(currentYear, "-04-30", sep = ""))
tS
## Subset of Weekends:
isWeekend(tS)
tS[isWeekend(tS)]
## Subset Business Days at NYSE:
holidayNYSE()
isBizday(tS, holidayNYSE())
tS[isBizday(tS, holidayNYSE())]