From 6a5f0225fe87f7cd0a2db1ad71167c75a1e93be6 Mon Sep 17 00:00:00 2001 From: oemel09 Date: Tue, 31 Dec 2019 13:59:58 +0100 Subject: [PATCH] Display still ongoing multiple day events as happening today --- CHANGELOG.md | 1 + modules/default/calendar/calendarfetcher.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ffdfbb9..67f73a23 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fix handling of config.js for serverOnly mode commented out. - Fixed issue in calendar module where the debug script didn't work correctly with authentication - Fixed issue that some full day events were not correctly recognized as such +- Display full day events lasting multiple days as happening today instead of some days ago if they are still ongoing ## [2.9.0] - 2019-10-01 diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index d8972459..d705905c 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -306,6 +306,11 @@ var CalendarFetcher = function(url, reloadInterval, excludedEvents, maximumEntri continue; } + // adjust start date so multiple day events will be displayed as happening today even though they started some days ago already + if (fullDayEvent && startDate <= today) { + startDate = moment(today); + } + // Every thing is good. Add it to the list. newEvents.push({