From 7630c25ef3448a4327b4fa40d24d51916b2d1d40 Mon Sep 17 00:00:00 2001 From: Sam Detweiler Date: Tue, 19 Feb 2019 07:06:22 -0600 Subject: [PATCH] add future date offset correction for emergency date values in absolute mode --- modules/default/calendar/calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 96ab322c..3f4f3f52 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -297,7 +297,7 @@ Module.register("calendar", { if (this.config.timeFormat === "absolute") { if ((this.config.urgency > 1) && (event.startDate - now < (this.config.urgency * oneDay))) { // This event falls within the config.urgency period that the user has set - timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow()); + timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").from(moment().format("YYYYMMDD"))); } else { timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").format(this.config.fullDayEventDateFormat)); }