Skip to contents

Is it a day-of-week name?

Usage

is_day_of_week(x)

Arguments

x

A character vector.

Value

Logical vector; TRUE for a full or three-letter English weekday name (Monday, Mon, ...). Numeric weekday positions are intentionally excluded as too ambiguous to detect from values alone.

Examples

is_day_of_week(c("Monday", "TUE", "Wed", "Someday", NA))
#> [1]  TRUE  TRUE  TRUE FALSE    NA