recur_on_month_of_year: Recur on a month of the year

View source: R/recur-on-month-of-year.R

recur_on_month_of_yearR Documentation

Recur on a month of the year

Description

recur_on_month_of_year() recurs on a specific month of the year.

Usage

recur_on_month_of_year(x, month)

Arguments

x

⁠[rrule]⁠

A recurrence rule.

month

⁠[integer / character]⁠

Months of the year to mark as events. Integer values must be between ⁠[1, 12]⁠. This can also be a full month string like "November", or an abbreviation like "Nov".

Value

An updated rrule.

Examples

# There is a big difference between adding this rule to a `yearly()`
# or `monthly()` frequency, and a `daily()` frequency.

# Limit from every day to every day in February
on_feb_daily <- daily() %>% recur_on_month_of_year("Feb")

# Limit from 1 day per month to 1 day in February
on_feb_monthly <- monthly() %>% recur_on_month_of_year("Feb")

start <- "1999-01-01"
end <- "2001-01-01"

alma_search(start, end, on_feb_daily)

alma_search(start, end, on_feb_monthly)

almanac documentation built on April 14, 2023, 12:23 a.m.