recurring_events v0.2.0 RecurringEvents.ByMonth View Source

Handles :by_month rule

Link to this section Summary

Functions

Applies :by_month 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 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.ByMonth.unfold(~D[2017-01-22],
...>       %{freq: :yearly, by_month: [1, 2, 3]})
...> |> Enum.take(10)
[~D[2017-01-22], ~D[2017-02-22], ~D[2017-03-22]]

iex> RecurringEvents.ByMonth.unfold(~D[2017-01-22],
...>       %{freq: :monthly, by_month: [1, 2, 3]})
...> |> Enum.take(10)
[~D[2017-01-22]]