Skip to contents

Obtain the weekdays of interest

Usage

weekdays(which_days = NULL)

Arguments

which_days

numeric() or character(), default NULL. If numeric, must be an index between 1:7. If character, must be one of c("Mon", "Tues", "Wed", "Thurs", "Fri", "Sat", "Sun"). If NULL, will return all week days.

Value

character() with selected weekdays

Examples


weekdays()
#> [1] "Mon"   "Tues"  "Wed"   "Thurs" "Fri"   "Sat"   "Sun"  
weekdays(1:3)
#> [1] "Mon"  "Tues" "Wed" 
weekdays(c("Mon", "Tues", "Wed"))
#> [1] "Mon"  "Tues" "Wed"