Get First / Last Day of a Quarter

first_of_quarter(x)

# S3 method for default
first_of_quarter(x)

last_of_quarter(x)

# S3 method for default
last_of_quarter(x)

Arguments

x

Anything that can be coerced to a date with base::as.Date()

Value

a Date

Examples

first_of_quarter("2016-06-04")
#> [1] "2016-04-01"
last_of_quarter("2016-06-04")
#> [1] "2016-06-30"