
One common financial markets date arithmetic requires a date needs to be
rolled to the closest business day following some convention (see
is_valid_bdc()
for further details). Such rolled dates can be determined by
calling adjust()
.
adjust(dates, bdc, calendar)
a vector of dates to adjust.
the business day convention used to roll the dates
if necessary
an object that inherits from Calendar
or JointCalendar
which is used to determine the goodness of dates
a vector of adjusted dates - good days are unadjusted
Other calendar methods: generate_schedule
,
is_good
, is_valid_bdc
,
is
, locale
,
shift
, tz
# NOT RUN {
ausy <- AUSYCalendar()
adjust(lubridate::ymd("20120102"), "u", ausy)
adjust(lubridate::ymd("20120102"), "f", ausy)
adjust(lubridate::ymd("20120102"), "mf", ausy)
adjust(lubridate::ymd("20120102"), "p", ausy)
adjust(lubridate::ymd("20120102"), "mp", ausy)
adjust(lubridate::ymd("20120102"), "ms", ausy)
# }
Run the code above in your browser using DataLab