Skip to contents

A year carrying an FY label, e.g. FY2019, FY19, FY 2020, or a crossover span FY2019-20 / FY2019/2020. Only the labelled form is detected: a bare four-digit year is intentionally excluded because it is indistinguishable by value from a count, an ID, or an ordinary integer.

Usage

is_fiscal_year(x)

Arguments

x

A character vector.

Value

Logical vector; TRUE for a labelled fiscal year.

Examples

is_fiscal_year(c("FY2019", "FY19", "FY2019-20", "2019", NA))
#> [1]  TRUE  TRUE  TRUE FALSE    NA