year-quarter-day-getters | R Documentation |
These are year-quarter-day methods for the getter generics.
get_year()
returns the fiscal year. Note that this can differ from the
Gregorian year if start != 1L
.
get_quarter()
returns the fiscal quarter as a value between 1-4.
get_day()
returns the day of the fiscal quarter as a value between 1-92.
There are sub-daily getters for extracting more precise components.
## S3 method for class 'clock_year_quarter_day'
get_year(x)
## S3 method for class 'clock_year_quarter_day'
get_quarter(x)
## S3 method for class 'clock_year_quarter_day'
get_day(x)
## S3 method for class 'clock_year_quarter_day'
get_hour(x)
## S3 method for class 'clock_year_quarter_day'
get_minute(x)
## S3 method for class 'clock_year_quarter_day'
get_second(x)
## S3 method for class 'clock_year_quarter_day'
get_millisecond(x)
## S3 method for class 'clock_year_quarter_day'
get_microsecond(x)
## S3 method for class 'clock_year_quarter_day'
get_nanosecond(x)
x |
A year-quarter-day to get the component from. |
The component.
x <- year_quarter_day(2020, 1:4)
get_quarter(x)
# Set and then get the last day of the quarter
x <- set_day(x, "last")
get_day(x)
# Start the fiscal year in November and choose the 50th day in
# each quarter of 2020
november <- 11
y <- year_quarter_day(2020, 1:4, 50, start = 11)
y
get_day(y)
# What does that map to in year-month-day?
as_year_month_day(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.