adjust: Compute adjusted dates

View source: R/dates.R

adjust_cppR Documentation

Compute adjusted dates

Description

Adjust a vector of dates following a business-day convention

Usage

adjust_cpp(dates, bdc = 0L, cal = NULL)

adjust(dates, bdc = c("Following", "ModifiedFollowing", "Preceding",
  "ModifiedPreceding", "Unadjusted", "HalfMonthModifiedFollowing", "Nearest"),
  cal = NULL)

Arguments

dates

A Date vector with dates

bdc

A character variable describing one of several supported values, the C++ version implements expects a corresponding integer value

cal

An optional calendar object, default is NULL in which case the global calendar is used

Details

This function takes a vector of dates and returns another vector of dates of the same length returning at each position the adjusted date according to the selected business-day convention. Currently supported values for the business day convention are (starting from zero): ‘Following’, ‘ModifiedFollowing’, ‘Preceding’, ‘ModifiedPreceding’, ‘Unadjusted’, ‘HalfModifiedFollowing’ and ‘Nearest’.

Value

A Date vector with dates adjust according to business-day convention

Examples

adjust(Sys.Date()+0:6)

qlcal documentation built on Feb. 18, 2026, 5:07 p.m.