edate: Calculate the date before / after months

View source: R/extendr-wrappers.R

edateR 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 ref_date

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)


ymd documentation built on Oct. 9, 2023, 5:10 p.m.

Related to edate in ymd...