fix(calendar): update to node-ical 0.23.1 and fix full-day recurrence lookup #4013
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adapts calendar module to node-ical changes and fixes a bug with moved full-day recurring events in eastern timezones.
Changes
1. Update node-ical to 0.23.1
getDateKey()behavior for VALUE=DATE events (now uses local date components)2. Remove dead code
3. Fix recurrence lookup for full-day events
node-ical changed the behavior of
getDateKey()- it now uses local date components for VALUE=DATE events instead of UTC. This broke recurrence override lookups for full-day events in eastern timezones.Why it broke:
Example:
"2024-10-12"(local date)"2024-10-11"(from UTC: Oct 11 22:00)Solution: Adapt to node-ical's new behavior by using local date components for full-day events, UTC for timed events.
Note: This is different from previous timezone fixes - those addressed event generation, this fixes the lookup of recurrence overrides.
Background
node-ical 0.23.0 switched from
rruletorrule-temporal, introducing breaking changes. Version 0.23.1 fixed the UNTIL validation issue and formalized thegetDateKey()behavior for DATE vs DATE-TIME values, following RFC 5545 specification that DATE values represent local calendar dates without timezone context.