Learn R Programming

dint (version 2.0.0)

is_quarter_bounds: Test for Quarter Bounds

Description

is_first_of_quarter() and is_last_of_quarter() check whether a Date is the first or respectively the last day of an (arbitrary) quarter. is_quarter_bounds() checks whether two Date vectors mark the bounds of single quarters

Usage

is_quarter_bounds(first, last)

is_first_of_quarter(x)

is_last_of_quarter(x)

is_Date(x)

Arguments

x, first, last

Date vectors

Value

a logical vector

Examples

Run this code
# NOT RUN {
x <- as.Date(c("2018-01-01", "2018-03-31", "2018-02-14"))
is_first_of_quarter(x)
is_last_of_quarter(x)
is_quarter_bounds(x[[1]], x[[2]])
is_quarter_bounds(x[[2]], x[[3]])

# }

Run the code above in your browser using DataLab