From c9577bcdc50d7d62090fdd54ac169a69309acaaa Mon Sep 17 00:00:00 2001 From: Janne Kalliola Date: Sun, 5 Aug 2018 19:47:27 +0300 Subject: [PATCH 1/2] Added an if to use absolute dates with all events --- modules/default/calendar/calendar.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 0780fb5c..7a4c2206 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -295,8 +295,12 @@ Module.register("calendar", { // If event is within 6 hour, display 'in xxx' time format or moment.fromNow() timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow()); } else { - // Otherwise just say 'Today/Tomorrow at such-n-such time' - timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").calendar()); + if(this.config.timeFormat === "absolute") { + timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").format(this.config.dateFormat)); + } else { + // Otherwise just say 'Today/Tomorrow at such-n-such time' + timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").calendar()); + } } } else { /* Check to see if the user displays absolute or relative dates with their events From 7c5e8a66e4269561d28b5d0dcf48495c23876edb Mon Sep 17 00:00:00 2001 From: Janne Kalliola Date: Sun, 5 Aug 2018 19:49:26 +0300 Subject: [PATCH 2/2] Added also description of the change to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b8c087c..67237d0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Mixup between german and spanish translation for newsfeed. +- Fixed close dates to be absolute, if no configured in the config.js - module Calendar ### Updated