Skip to content

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