Creates a schedule of events occurring on the dates specified.

This function is best used when making ad-hoc changes to other schedules.

on_date(...)

Arguments

...

A vector of dates.

Value

A schedule object.

Examples

my_dates <- seq.Date(as.Date("2000-01-01"), as.Date("2000-01-05"), "1 day") on_first_day_millennium <- on_date(as.Date("2000-01-01")) on_first_or_second_day_millennium <- on_date(as.Date("2000-01-01"), as.Date("2000-01-02")) happen(on_first_day_millennium, my_dates)
#> [1] TRUE FALSE FALSE FALSE FALSE
happen(on_first_or_second_day_millennium, my_dates)
#> [1] TRUE TRUE FALSE FALSE FALSE
on_regular_paydays <- on_mday(25) on_bonus_payday <- on_date(as.Date("2000-12-20")) on_paydays <- also_occur(on_bonus_payday, on_regular_paydays) schedule_days(on_paydays, during = 2000)
#> [1] "2000-01-25" "2000-02-25" "2000-03-25" "2000-04-25" "2000-05-25" #> [6] "2000-06-25" "2000-07-25" "2000-08-25" "2000-09-25" "2000-10-25" #> [11] "2000-11-25" "2000-12-20" "2000-12-25"