Skip to content

fix(calendar): correct multi-day slice day counts - #4232

Merged
khassel merged 1 commit into
MagicMirrorOrg:developfrom
KristjanESPERANTO:refactor/calendar
Aug 18, 2026
Merged

fix(calendar): correct multi-day slice day counts#4232
khassel merged 1 commit into
MagicMirrorOrg:developfrom
KristjanESPERANTO:refactor/calendar

Conversation

@KristjanESPERANTO

Copy link
Copy Markdown
Collaborator

While reviewing #4208, I had a bit of a headache figuring out the sliceMultiDay logic. I cleaned that part up to make it easier to follow and structurally clearer. In doing so, I noticed the previous calculation was wrong in two edge cases:

  • events crossing a DST change were not split by the actual calendar days they touched
  • events ending exactly at 00:00 were incorrectly counted as an additional day

These cases are easy to miss because they are rare and only show up in specific time windows or timezone transitions.

The logic now splits multi-day events by the calendar days they actually cover and handles the boundary cases correctly.

@khassel
khassel merged commit 09ede7f into MagicMirrorOrg:develop Aug 18, 2026
13 checks passed
@KristjanESPERANTO
KristjanESPERANTO deleted the refactor/calendar branch August 18, 2026 19:45
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