These are year-quarter-day methods for the arithmetic generics.

Notably, *you cannot add days to a year-quarter-day*. For day-based
arithmetic, first convert to a time point with `as_naive_time()`

or
`as_sys_time()`

.

# S3 method for clock_year_quarter_day add_years(x, n, ...) # S3 method for clock_year_quarter_day add_quarters(x, n, ...)

x |
A year-quarter-day vector. |
---|---|

n |
An integer vector to be converted to a duration, or a duration
corresponding to the arithmetic function being used. This corresponds
to the number of duration units to add. |

... | These dots are for future extensions and must be empty. |

`x`

after performing the arithmetic.

`x`

and `n`

are recycled against each other.

#> <year_quarter_day<January><quarter>[3]> #> [1] "2019-Q1" "2019-Q2" "2019-Q3"#> <year_quarter_day<January><quarter>[3]> #> [1] "2019-Q3" "2019-Q4" "2020-Q1"#> <year_quarter_day<March><day>[2]> #> [1] "2019-Q1-01" "2019-Q2-01"#> <year_quarter_day<March><day>[2]> #> [1] "2019-Q2-01" "2019-Q3-01"# What year-month-day does this correspond to? # Note that the fiscal year doesn't necessarily align with the Gregorian # year! as_year_month_day(add_quarters(y, 1))#> <year_month_day<day>[2]> #> [1] "2018-06-01" "2018-09-01"