Read the statement by Michael Teeuw here.
v2.26.0 - default calendar rrule / event.recurrences issue
-
This event:
BEGIN:VEVENT DTSTART;TZID=Europe/Berlin:20240104T180000 DTEND;TZID=Europe/Berlin:20240104T200000 RRULE:FREQ=WEEKLY;WKST=MO;COUNT=10;BYDAY=TH DTSTAMP:20240102T212443Z UID:63c23cpe0h356vgjl0o4tsnjbi@google.com CREATED:20240102T212139Z LAST-MODIFIED:20240102T212139Z SEQUENCE:0 STATUS:CONFIRMED SUMMARY:#:SingleEventRepeating TRANSP:OPAQUE END:VEVENT
Leads to this:
0|MagicMirror | [02.01.2024 22:22.25.197] [DEBUG] Title: #:SingleEventRepeating, with dates: ["2024-01-04T17:00:00.000Z","2024-01-11T17:00:00.000Z",null,null,"2024-02-01T17:00:00.000Z","2024-02-08T17:00:00.000Z",null,null,null,"2024-03-07T17:00:00.000Z"] 0|MagicMirror | [02.01.2024 22:22.25.197] [DEBUG] event.recurrences: undefined
So:
[ "2024-01-04T17:00:00.000Z", "2024-01-11T17:00:00.000Z", null, null, "2024-02-01T17:00:00.000Z", "2024-02-08T17:00:00.000Z", null, null, null, "2024-03-07T17:00:00.000Z" ]
Resulting in MM showing only 5 of the 10 events.
I would like to know where to look for the RRULE processing; cannot find anything in the calendar code.
As there are some other issues that I found, I could perhaps learn something from it.Otherwise I will open an issue for it.
-
@evroom we don’t do the RRULE processing ourselves,… we call the RRULE library function between
rrule.between(now and 1 year from now)
calendarfetcherutils.js
Log.debug(`Search for recurring events between: ${pastLocal} and ${futureLocal}`); let dates = rule.between(pastLocal, futureLocal, true, limitFunction); Log.debug(`Title: ${event.summary}, with dates: ${JSON.stringify(dates)}`); dates = dates.filter((d) => { if (JSON.stringify(d) === "null") return false; else return true; });
the we process the dates returned… note the filter I added this release, cause the null values returned killed the calendar
-
FYI: I think this is related to the latest
rrule
release (2.7.0), which was updated whennode-ical
was upgraded to 0.17.1 (from 0.16.1). It looks likerrule
removedluxon
with its own self-built replacement… and the behavior changed.If you sift through issues filed in
node-ical
andrrule
, there seems to be folks also seeing new recurrence behavior. As to why, /shrug…On my install, I rolled-back to the older version (
npm install node-ical@0.16.1
) and it seems now to be behaving. -