fix(calendar): sliced multi-day events start at 00:00, not 23:59#4208
Merged
KristjanESPERANTO merged 1 commit intoJul 17, 2026
Merged
Conversation
Collaborator
|
@ago1776 Thanks for that. But please point your PR to the devlop branch, not to master. |
With `sliceMultiDayEvents: true`, every slice after the first was given the
following day's `endOf("day")` (23:59:59.999) as its `startDate`, so slices
2..n rendered a start time of 23:59 instead of the next day's 00:00.
Set the next slice's start to `startOf("day")` of that day.
Adds an electron regression test (scenario `slice_multiday_timed_start_midnight`
with a timed event spanning several midnights): every rendered slice time cell
must contain a 00:00 start and never 23:59. Fails without the fix.
Closes MagicMirrorOrg#4206
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 890db2b)
ago1776
force-pushed
the
fix/slice-multiday-midnight
branch
from
July 17, 2026 11:13
890db2b to
ffcd8dd
Compare
Author
|
Retargeted this PR from |
KristjanESPERANTO
approved these changes
Jul 17, 2026
KristjanESPERANTO
left a comment
Collaborator
There was a problem hiding this comment.
LGTM! Thanks :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #4206.
Problem
With
sliceMultiDayEvents: true, multi-day events are split into(1/n),(2/n), … Every slice after the first was rendered with a start time of 23:59 instead of the next day's 00:00.Cause
In
defaultmodules/calendar/calendar.js, the slicing loop reusesmidnight(which is.endOf("day")=23:59:59.999) as the start of the following slice:Fix
Set the next slice's start to the beginning of that day:
Regression test
As requested, added an electron regression test (
sliceMultiDayEvents slice start time) plus a scenarioslice_multiday_timed_start_midnightand a fixture with a timed event spanning several midnights (Fri 12:00 → Mon 08:00). It asserts that every rendered slice time cell contains a00:00start and never23:59.Verified locally:
23:59.prettier,eslintandcspellare clean on the changed files.