mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-23 13:24:06 +00:00
Fixes #3095. Param `hideOngoing` is by default set to `false`, but the event filtering handles `full day` & `non-full day` events inconsistently. For `non-full day` _ongoing_ and _upcoming_ events are returned, while for `full day` only _upcoming_ events where returned.
This commit is contained in:
@@ -453,6 +453,11 @@ const CalendarFetcherUtils = {
|
||||
const fullDayEvent = isFacebookBirthday ? true : CalendarFetcherUtils.isFullDayEvent(event);
|
||||
// Log.debug("full day event")
|
||||
|
||||
// if the start and end are the same, then make end the 'end of day' value (start is at 00:00:00)
|
||||
if (fullDayEvent && startDate.format("x") === endDate.format("x")) {
|
||||
endDate = endDate.endOf("day");
|
||||
}
|
||||
|
||||
if (config.includePastEvents) {
|
||||
// Past event is too far in the past, so skip.
|
||||
if (endDate < past) {
|
||||
@@ -479,10 +484,6 @@ const CalendarFetcherUtils = {
|
||||
return;
|
||||
}
|
||||
|
||||
// if the start and end are the same, then make end the 'end of day' value (start is at 00:00:00)
|
||||
if (fullDayEvent && startDate.format("x") === endDate.format("x")) {
|
||||
endDate = endDate.endOf("day");
|
||||
}
|
||||
// get correction for date saving and dst change between now and then
|
||||
let adjustDays = CalendarFetcherUtils.calculateTimezoneAdjustment(event, startDate.toDate());
|
||||
// Every thing is good. Add it to the list.
|
||||
|
Reference in New Issue
Block a user