is_quarter_bounds {dint} | R Documentation |
Useful Predicates for Dates
Description
is_first_of_quarter()
, is_last_of_quarter()
, is_first_of_year()
and
is_last_of_year()
check whether a Date
is the first or respectively the
last day of a quarter/year. is_quarter_bounds()
and is_year_bounds
checks
whether two Date
vectors mark the bounds of (the same) quarters
Usage
is_quarter_bounds(first, last)
is_first_of_quarter(x)
is_last_of_quarter(x)
is_year_bounds(first, last)
is_first_of_year(x)
is_last_of_year(x)
is_Date(x)
is_POSIXlt(x)
Arguments
x , first , last |
|
Value
a logical
vector
Examples
x <- as.Date(c("2018-01-01", "2018-03-31", "2018-02-14"))
is_first_of_year(x)
is_first_of_quarter(x)
is_last_of_quarter(x)
is_quarter_bounds(x[[1]], x[[2]])
is_quarter_bounds(x[[2]], x[[3]])
[Package dint version 2.1.4 Index]