Skip to contents

Calculate with periods (format yyyymm)

Usage

yyyymm_calc(yyyymm, add_month = 0, add_year = 0)

Arguments

yyyymm

Input vector of periods (format yyyymm)

add_month

How many months to add (can be negative too)

add_year

How many years to add (can be negative too)

Value

Vector of periods (format yyyymm)

Examples

yyyymm_calc(202412, add_month = 1)
#> [1] 202501
yyyymm_calc(c(202411,202412,202501), add_month = -1, add_year = 1)
#> [1] 202510 202511 202512