diff --git a/CHANGELOG.md b/CHANGELOG.md index 166f84b4..0c414c0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,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 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