Skip to contents

ISO quarter (numeric) from Date object

Usage

date_to_isoquarter_n(x = lubridate::today())

# S3 method for default
date_to_isoquarter_n(x)

# S3 method for character
date_to_isoquarter_n(x = lubridate::today())

# S3 method for Date
date_to_isoquarter_n(x = lubridate::today())

Arguments

x

a Date object or string, in the form of 'yyyy-mm-dd'

Value

ISO quarter in numeric

Examples

date_to_isoquarter_n("2021-08-11")
#> [1] 3
date_to_isoquarter_n(lubridate::today())
#> [1] 4