recurring_events v0.2.0 RecurringEvents.ByMonthDay View Source

Handles :by_month_day rule

Link to this section Summary

Functions

Applies :by_month_day rule to given date and returns enumerable. Depends on other rules it may create additional dates keep one provided or remove it. See tests for details

Link to this section Functions

Applies :by_month_day rule to given date and returns enumerable. Depends on other rules it may create additional dates keep one provided or remove it. See tests for details.

Examples

iex> RecurringEvents.ByMonthDay.unfold(~D[2017-01-22], …> %{freq: :weekly, by_month_day: [18, 31]}) …> |> Enum.take(10) [~D[2017-01-18]]

iex> RecurringEvents.ByMonthDay.unfold(~D[2017-01-22], …> %{freq: :monthly, by_month_day: [1, -1]}) …> |> Enum.take(10) [~D[2017-01-01], ~D[2017-01-31]]