Skip to contents

Is it a month-of-year name?

Usage

is_month_of_year(x)

Arguments

x

A character vector.

Value

Logical vector; TRUE for a full or three-letter English month name (January, Jan, ...). Numeric month positions (01-12) are intentionally excluded as too ambiguous to detect from values alone.

Examples

is_month_of_year(c("January", "feb", "Aug", "Smarch", NA))
#> [1]  TRUE  TRUE  TRUE FALSE    NA