The qtr functions take a date input and calculate the relevant
quarter-related value from it. They all return the year as part of this
value.
qtr returns the current quarter
qtr_end returns the last month in the quarter
qtr_next returns the next quarter
qtr_prev returns the previous quarter
Usage
qtr(date, format = c("long", "short"))
qtr_end(date, format = c("long", "short"))
qtr_next(date, format = c("long", "short"))
qtr_prev(date, format = c("long", "short"))
Value
A character vector of financial quarters in the specified format.
Arguments
date
A date which must be supplied with Date or POSIXct
format
A character string specifying the format the quarter
should be displayed in. Valid options are long (January to March 2018) and
short (Jan-Mar 2018). The default is long.