# ANBIMA's calendar (from Brazil)
holidays <- as.Date(c(
"2015-01-01", "2015-02-16", "2015-02-17", "2015-04-03", "2015-04-21",
"2015-05-01", "2015-06-04", "2015-09-07", "2015-10-12", "2015-11-02",
"2015-11-15", "2015-12-25", "2016-01-01", "2016-02-08", "2016-02-09",
"2016-03-25", "2016-04-21", "2016-05-01", "2016-05-26", "2016-09-07",
"2016-10-12", "2016-11-02", "2016-11-15", "2016-12-25"
))
cal <- create.calendar("ANBIMA",
holidays = holidays,
weekdays = c("saturday", "sunday")
)
# ACTUAL calendar
cal <- create.calendar("Actual")
# named calendars can be accessed by its name
create.calendar(name = "Actual")
bizdays("2016-01-01", "2016-03-14", "Actual")
Run the code above in your browser using DataLab