advanceDate {qlcal}R Documentation

Advance a date

Description

Advance a date to the next business day plus an optional shift

Usage

advanceDate(rd, days = 0L, unit = "Days", bdc = "Following",
  eom = FALSE)

Arguments

rd

A Date object describing the date to be advanced to the next business day.

days

An optional integer offset applied to the date

unit

An optional character value denoting a time unit, default value is “Day”, and supported values are “Days”, “Weeks”, “Months”, “Years”, “Hours”, “Seconds”, “Minutes”, “Milliseconds”, “Microseconds”.

bdc

An optional integer defining a business day convention, default is “Following”, and supported values are “Following”, “ModifiedFollowing”, “Preceding”, “ModifiedPreceding”, “Unadjusted”, “HalfMonthModifiedFollowing” and “Nearest”.

eom

An optional boolean toggle whether end-of-month is to be respected

Details

This function takes a given date and advances it to the next business day under the current (global) calendar setting. If an optional offset value is given it is applied as well.

Value

The advanced date is returned

See Also

The advanceUnits functions offers the same functionality from R.

Examples

advanceDate(Sys.Date(), 2)  # today to the next biz day, plus 2 days

[Package qlcal version 0.0.12 Index]