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

BYMONTHDAY Support #272

Merged
merged 5 commits into from
Nov 2, 2020
Merged

BYMONTHDAY Support #272

merged 5 commits into from
Nov 2, 2020

Conversation

s0600204
Copy link
Collaborator

@s0600204 s0600204 commented Nov 2, 2020

This PR adds support for the BYMONTHDAY rrule stanza under the DAILY, MONTHLY and YEARLY frequencies; and it should function in combination with other implemented compatible BY* stanzas (e.g. BYDAY).

This PR does not add support for it under WEEKLY, as the rfc5545 specification states:

The BYMONTHDAY rule part MUST NOT be specified when the FREQ rule part is set to WEEKLY.

Relevant tests are included.

Refs. #11

(Not to be confused with `getDaysOfMonthMatchingByDayRRule()`)

Does what it says on the tin.

For now, used only with the MONTHLY frequency but should be usable with DAILY as well.
The return value only differs from a previous call when the month changes,
so instead of running the method every iteration of a DAILY cycle,
we recreate the variable only after a month change.
@s0600204 s0600204 added this to the v2.x.x milestone Nov 2, 2020
@s0600204 s0600204 requested a review from u01jmg3 November 2, 2020 00:17
@s0600204 s0600204 self-assigned this Nov 2, 2020
@u01jmg3 u01jmg3 merged commit 2ea607a into u01jmg3:master Nov 2, 2020
u01jmg3 referenced this pull request Nov 2, 2020
@s0600204 s0600204 deleted the bymonthday branch November 2, 2020 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants