year-quarter-day-boundary | R Documentation |
This is a year-quarter-day method for the calendar_start()
and
calendar_end()
generics. They adjust components of a calendar to the
start or end of a specified precision
.
## S3 method for class 'clock_year_quarter_day'
calendar_start(x, precision)
## S3 method for class 'clock_year_quarter_day'
calendar_end(x, precision)
x |
A year-quarter-day vector. |
precision |
One of:
|
x
at the same precision, but with some components altered to be
at the boundary value.
x <- year_quarter_day(2019:2020, 2:3, 5, 6, 7, 8, start = clock_months$march)
x
# Compute the last moment of the fiscal quarter
calendar_end(x, "quarter")
# Compare that to just setting the day to `"last"`,
# which doesn't affect the other components
set_day(x, "last")
# Compute the start of the fiscal year
calendar_start(x, "year")
as_date(calendar_start(x, "year"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.