add_month: Add or subtract months to a given date character

View source: R/rutils.R

add_monthR Documentation

Add or subtract months to a given date character

Usage

add_month(input_date, num_months = 1)

Arguments

num_months

(numeric or integer): Number of months to be added to the given date. It can be a negative number.

Value

(character): date pointing to the input date with added months

Examples

add_month('2012-06-01', 3)
[1] "2012-09-01"
add_month('2010-03-12', -6)
[1] "2009-09-12"

genpack/gener documentation built on March 14, 2023, 9:52 a.m.