Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional options for mday #172

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

pareeohnos
Copy link

Adds new options that can be supplied when creating an mday recurrence. This is backwards compatible with the existing API, but now allows for overriding specific months, or specifying a fallback if a month does not meet the criteria.

Montrose.every(:month, mday: { default: 30, fallback: -1 })
Montrose.every(:month, mday: { default: 30, february: 28, march: 29 })
Montrose.every(:month, mday: { default: 30, [:february, :march] => 29, fallback: -1)

Resolves issues #171 and #134

Adds new options that can be supplied when creating an `mday` recurrence.
This is backwards compatible with the existing API, but now allows for
overriding specific months, or specifying a fallback if a month does not
meet the criteria.

```
Montrose.every(:month, mday: { default: 30, fallback: -1 })
Montrose.every(:month, mday: { default: 30, february: 28, march: 29 })
Montrose.every(:month, mday: { default: 30, [:february, :march] => 29, fallback: -1)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant