advanceDate {qlcal} | R Documentation |
Advance a date to the next business day plus an optional shift
advanceDate(rd, days = 0L, unit = "Days", bdc = "Following",
eom = FALSE)
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 |
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.
The advanced date is returned
The advanceUnits
functions offers the same functionality from R.
advanceDate(Sys.Date(), 2) # today to the next biz day, plus 2 days