first_wday_in_month: Find the first X day in month Y in one or multiple years

View source: R/first_wday_in_month.R

first_wday_in_monthR Documentation

Find the first X day in month Y in one or multiple years

Description

Find, for example, the first Saturday in November every year from 2014-2018.

Usage

first_wday_in_month(day, month, years)

Arguments

day

A month of the year (e.g., "November", "December", etc.)

years

A vector of years (e.g., 2014, 2014:2016)

Value

A vector of dates

Examples

# Find the first Saturday of November in 2014-2018
first_sats <- first_wday_in_month(day="Saturday", month="November", years=2014:2018)
first_sats

cfree14/freeR documentation built on Aug. 22, 2023, 11:12 p.m.