Learn R Programming

ymd (version 0.1.5)

edate: 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

Examples

Run this code
edate(as.Date("2020-01-31"), 1)
## supports 'YMD' formatted integer or string
edate(200131, 1)
edate(200229, -12)

Run the code above in your browser using DataLab