date_xx_arithmetic: date_xx Arithmetic Operations

Description Usage Arguments See Also Examples

Description

The arithmetic operations +, - as well as sequence generation with seq() are all supported for date_yq and date_ym objects. Other binary arithmetic operators are disabled (see date_xx_arithmetic_disabled).

Usage

1
2
3
4
5
## S3 method for class 'date_xx'
x + y

## S3 method for class 'date_xx'
x - y

Arguments

x

a date_yq or date_ym object

y

an integer

...

currently ignored

See Also

base::Arithmetic

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
q <- date_yq(2018, 1)


q + 5
q - 1
seq(q, q + 5)


m <- date_ym(2018, 12)
m + 1
m - 13
seq(m - 1, m + 1)

dint documentation built on May 2, 2019, 2:01 p.m.