mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 12:12:20 +00:00
All events from the beginning of today were fetched but we only want
the ones that are ongoing or upcoming.
This commit is contained in:
parent
2779d19d5c
commit
8a5e87b116
@ -382,7 +382,7 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
|
|||||||
} else {
|
} else {
|
||||||
// All events from startOfToday are fetched but we only want the ones that haven't ended yet
|
// All events from startOfToday are fetched but we only want the ones that haven't ended yet
|
||||||
const now = moment();
|
const now = moment();
|
||||||
for (ne of newEvents) {
|
for (var ne of newEvents) {
|
||||||
if (moment(ne.endDate, "x").isAfter(now)) events.push(ne);
|
if (moment(ne.endDate, "x").isAfter(now)) events.push(ne);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user