MagicMirror/tests/mocks/exdate_and_recurrence_together.ics
sam detweiler 19bd76ab93
Fixcaldates2 fix calendar module date processing, using node-ical@0.20.1 (#3587)
here is an updated test version of the fixes for all kinds of calendar
date problems.

NOTE: the changed branch name
NOTE: this used the node-cal@0.19.0 library UNCHANGED

best to make a new folder and git clone there

git clone https://github.com/sdetweil/MagicMirror
cd MagicMirror
git checkout fixcaldates2 // <------ note this is a changed branch name
npm run install-mm
copy your config.js and custom.css from the prior folder
and the non-default modules you have installed…

this ONLY changes the default calendar
but DOES ship an updated node-ical library too

if you need to fall back, just rename the folders around again so that
your original is called MagicMirror

all the testcases for node-ical and MagicMirror execute successfully.

the ‘BIG’ change here is to get the local NON-TZ dates for the
rrule.between()

all the checking and conversion code is commented out or not used
the node-ical fixes are for excluded dates (exdate) values being
adjusted for DST/STD time… waiting to submit that PR

one fix in calendar.js for checking if a past date was too far back,
but it never checked to see IF the event date was in the past… (before
today) so it chopped off too many

and one change in calendarfetcher.js to put out a better diagnostic
message of the parsed data… (exdate was excluded cause JSON stringify
couldn’t convert the complex structure)

I added the tests you all have documented

please re-pull and checkout the new branch (I deleted the old branch)
and npm run install-mm again

---------

Co-authored-by: Veeck <github@veeck.de>
2024-12-07 09:51:11 +01:00

49 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

BEGIN:VCALENDAR
BEGIN:VEVENT
DTSTART;TZID=America/Los_Angeles:20241023T143000
DTEND;TZID=America/Los_Angeles:20241023T153000
RRULE:FREQ=DAILY;COUNT=4
EXDATE;TZID=America/Los_Angeles:20241025T143000
DTSTAMP:20241021T193426Z
UID:18rd721lfqpue2o08icsqek198@google.com
CREATED:20241021T192450Z
DESCRIPTION:we will move one entry and delete another  ending w 3 of the 4 
start/end\, middle moved after end and 3rd deleted
LAST-MODIFIED:20241021T193419Z
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:recurrence and exclusion together
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
DTSTART;TZID=America/Los_Angeles:20241022T143000
DTEND;TZID=America/Los_Angeles:20241022T153000
DTSTAMP:20241021T193426Z
UID:18rd721lfqpue2o08icsqek198@google.com
RECURRENCE-ID;TZID=America/Los_Angeles:20241023T143000
CREATED:20241021T192450Z
DESCRIPTION:we will move one entry and delete another  ending w 3 of the 4 
start/end\, middle moved after end and 3rd deleted
LAST-MODIFIED:20241021T193419Z
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:recurrence and exclusion together
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
DTSTART;TZID=America/Los_Angeles:20241027T143000
DTEND;TZID=America/Los_Angeles:20241027T153000
DTSTAMP:20241021T193426Z
UID:18rd721lfqpue2o08icsqek198@google.com
RECURRENCE-ID;TZID=America/Los_Angeles:20241024T143000
CREATED:20241021T192450Z
DESCRIPTION:we will move one entry and delete another  ending w 3 of the 4 
start/end\, middle moved after end and 3rd deleted
LAST-MODIFIED:20241021T193419Z
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:recurrence and exclusion together
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR