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

Expand recurring event enh #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

muddjones
Copy link

  1. Added support for day recurrence (i.e. BYDAY=3TU) :: [lines 36-44, 95-100]
  2. Break out of 'for' loop once date is found :: [line 115]
  3. Once first date in recurring series is found and newStart and newEnd are reset, roll back to the first of the month of newStart and set newEnd accordingly :: [lines 151-158]
    NOTE: This change was added because test cases like this were failing:
    I correctly received an event on 11/04/2019, but since 1 month was added to this start date, the next month started looking for "first monday" on 12/04/2019 and returned 12/09/2019 when it should have returned 12/02/2019.

TEST CASE EXAMPLE:
BEGIN:VEVENT
DTSTART;TZID=America/Los_Angeles:20191104T090000
DTEND;TZID=America/Los_Angeles:20191104T100000
RRULE:FREQ=MONTHLY;BYDAY=1MO
DTSTAMP:20191023T175925Z
UID:6uvrlpou5dsso6hnng6p65es41@google.com
CREATED:20191021T154144Z
DESCRIPTION:
LAST-MODIFIED:20191021T220941Z
LOCATION:
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:Test Monthly First Monday
TRANSP:OPAQUE
END:VEVENT

Attached is a test file I used to verify my changes in multiple scenarios.
multiRecurrExamples.ics.txt

@apognu
Copy link
Owner

apognu commented Dec 31, 2019

Existing tests are failing when I try and merge this. Also, could you write a test case validating recurrence expansion for this?

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.

2 participants