edate {ymd} | R Documentation |
Calculate the date before / after months
Description
Calculate the date before / after months
Usage
edate(ref_date, months)
Arguments
ref_date |
a Date vector |
months |
the number of months that's added to |
Note
The function name is the same as the Excel function EDATE()
and
does the same. It returns the date that is the indicated number of months
before or after the ref date.
Examples
edate(as.Date("2020-01-31"), 1)
## supports 'YMD' formatted integer or string
edate(200131, 1)
edate(200229, -12)
[Package ymd version 0.1.0 Index]