list_weekdays: Find the all dates for weekday in a month

View source: R/utils.R

list_weekdaysR Documentation

Find the all dates for weekday in a month

Description

Determine the exact days (i.e. YYYY-MM-DD) that a specific day of the week falls on.

Usage

list_weekdays(year, month, weekday)

Arguments

year

character or numeric for 4 digit year.

month

character or numeric (01-12) for month.

weekday

character value for day of the week (e.g. 'Monday').

Value

Date vector object in YYYY-MM-DD format.

Examples

list_weekdays(2021, 12, 'Monday')
list_weekdays(2021, 12, 'Monday')[1]
list_weekdays('2021', 12, 'Monday')
lapply(c(1990:2000), list_weekdays, month = 12, weekday = 'Monday')

al-obrien/farrago documentation built on April 14, 2023, 6:20 p.m.