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

Handle case of RRULE:COUNT=1 #294

Merged
merged 1 commit into from
Jan 12, 2022
Merged

Handle case of RRULE:COUNT=1 #294

merged 1 commit into from
Jan 12, 2022

Conversation

s0600204
Copy link
Collaborator

MS Outlook, as reported in #293, may in some cases reduce the COUNT stanza of an RRULE to 1.

(Whilst not disallowed in the RFC5545 spec (or any of its errata to date), having a COUNT of 1 has no practical purpose that I can see.)

We currently only check we've reached the count-limit after we've generated the first few recurrences of an event and - more pressingly - after we've appended the first candidate to the array of generated recurrences.


In the solution presented in this PR, PHP_MAX_INT could be replaced with some suitable user-settable default number, akin to the current defaultSpan property used to put an upper limit on UNTIL. But that's perhaps something for another PR.

Outlook, as reported in u01jmg3#293, may in some cases reduce `COUNT` to `1`.

Whilst not disallowed in the RFC5545 spec (or any of its errata to date),
having a `COUNT` of `1` has no practical purpose that I can see.

We currently only check we've reached the count-limit *after* we've generated
the first few recurrences of an event and - more pressingly - *after* we've
appended the first candidate to the array of generated recurrences.

In this case `PHP_MAX_INT` could be replaced with some suitable default number,
akin to the current `defaultSpan` property used to put a limit on UNTIL.
But that's something for another PR.
@u01jmg3 u01jmg3 merged commit 7e52af2 into u01jmg3:master Jan 12, 2022
@s0600204 s0600204 deleted the issue-293 branch January 12, 2022 22:23
@u01jmg3 u01jmg3 added this to the v2.x.x milestone Mar 5, 2022
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.

Possible Recurrence Rule Processing Bug: Event Appears in Parser that Does Not Exist
2 participants