AddDate: AddDate

Description Usage Arguments Value Author(s) Examples

View source: R/DateManipulation.R

Description

Function to add a number of days, months and years to a specific date. The length of addDays, addMonths and addYears must be the same.

Usage

1
AddDate(date = Sys.Date(), addDays = 0, addMonths = 0, addYears = 0)

Arguments

date

Initial date.

addDays

If specified, vector number of days to add to the initial date.

addMonths

If specified, vector number of months to add to the initial date.

addYears

If specified, vector number of years to add to the initial date.

Value

The output is the final date after adding the number of days, months and years to the initial date.

Author(s)

Julian Chitiva and Diego Jara

Examples

1
2
3
4
5
# Date input as Date object
AddDate(date = Sys.Date(),addDays=14,addMonths=2,addYears=3)

# Date input as character object
AddDate(date = '2019-10-04',addDays=14,addMonths=2,addYears=3)

quantdates documentation built on July 1, 2020, 5:26 p.m.