year-week-day-count-between {clock} | R Documentation |
Counting: year-week-day
Description
This is an year-week-day method for the calendar_count_between()
generic. It counts the number of precision
units between start
and end
(i.e., the number of years).
Usage
## S3 method for class 'clock_year_week_day'
calendar_count_between(start, end, precision, ..., n = 1L)
Arguments
start , end |
A pair of year-week-day vectors. These will be recycled to their common size. |
precision |
One of:
|
... |
These dots are for future extensions and must be empty. |
n |
A single positive integer specifying a multiple of |
Value
An integer representing the number of precision
units between
start
and end
.
Examples
# Compute the number of whole years between two dates
x <- year_week_day(2001, 1, 2)
y <- year_week_day(2021, 1, c(1, 3))
calendar_count_between(x, y, "year")
[Package clock version 0.7.1 Index]