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

ICAL.Event::iterator throwing error if rdate property value is period #640

Open
amanullah28 opened this issue Nov 20, 2023 · 0 comments · May be fixed by #679
Open

ICAL.Event::iterator throwing error if rdate property value is period #640

amanullah28 opened this issue Nov 20, 2023 · 0 comments · May be fixed by #679
Assignees
Labels

Comments

@amanullah28
Copy link

sample ics: BEGIN:VEVENT
DTSTART;TZID=W. Europe:20231123T100000
DTEND;TZID=W. Europe:20231123T123000
TRANSP:OPAQUE
RDATE;TZID=W. Europe;VALUE=PERIOD:20231123T100000/20231123T123000
RECURRENCE-ID:20231116T090000Z
DTSTAMP:20231113T114638Z
SEQUENCE:2
ATTENDEE;PARTSTAT=ACCEPTED;CN=Test Attendee;RSVP=FALSE:testatttendee@testattendee.com
CLASS:PUBLIC
SUMMARY: Test Event
LOCATION:test
ORGANIZER;CN=test/ASSBZ:mailto:test@test12344.com
UID:F2CCF1D60607A08BC12588D3002960B6
END:VEVENT

` if (component.hasProperty('rdate')) {
this.ruleDates = this._extractDates(component, 'rdate');

    // special hack for cases where first rdate is prior
    // to the start date. We only check for the first rdate.
    // This is mostly for google's crazy recurring date logic
    // (contacts birthdays).
    if ((this.ruleDates[0]) &&
        (this.ruleDates[0].compare(this.dtstart) < 0)) {

      this.ruleDateInc = 0;
      this.last = this.ruleDates[0].clone();
    } else {
      this.ruleDateInc = ICAL.helpers.binsearchInsert(
        this.ruleDates,
        this.last,
        compareTime
      );
    }

    this.ruleDate = this.ruleDates[this.ruleDateInc];
  }`

This code snippet is from _init() method which is failing and its failing while comparing ruleDates with dtstart because ruleDates[0] is an object and compare is not defined on that
ruleDates[0]: {end: icalTime, start: icalTime} which is an instance of icalperiod

@kewisch kewisch added the bug label Apr 1, 2024
@kewisch kewisch linked a pull request May 1, 2024 that will close this issue
@kewisch kewisch self-assigned this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants