diff --git a/CHANGELOG.md b/CHANGELOG.md index 243b7d15..661eda5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,11 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## Unpublished ### Updated -- Force fullscreen when kioskmode is active. -- Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js' +- Force fullscreen when kioskmode is active. + +### Added +- Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'. +- Added ability to define "the day after tomorrow" for calendar events (Definition for German already included). ## [2.0.4] - 2016-08-07 diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index c90153a0..d4871338 100644 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -150,6 +150,16 @@ Module.register("calendar",{ timeWrapper.innerHTML = this.translate("TODAY"); } else if (event.startDate - now < one_day && event.startDate - now > 0) { timeWrapper.innerHTML = this.translate("TOMORROW"); + } else if (event.startDate - now < 2*one_day && event.startDate - now > 0) { + /*Provide ability to show "the day after tomorrow" instead of "in a day" + *if "DAYAFTERTOMORROW" is configured in a language's translation .json file, + *,which can be found in MagicMirror/translations/ + */ + if (this.translate('DAYAFTERTOMORROW') !== 'DAYAFTERTOMORROW') { + timeWrapper.innerHTML = this.translate("DAYAFTERTOMORROW"); + } else { + timeWrapper.innerHTML = moment(event.startDate, "x").fromNow(); + } } else { /* Check to see if the user displays absolute or relative dates with their events * Also check to see if an event is happening within an 'urgency' time frameElement diff --git a/translations/de.json b/translations/de.json index d4c20d10..d8a254a9 100644 --- a/translations/de.json +++ b/translations/de.json @@ -5,6 +5,7 @@ /* CALENDAR */ "TODAY": "Heute", "TOMORROW": "Morgen", + "DAYAFTERTOMORROW": "Übermorgen", "RUNNING": "noch", "EMPTY": "Keine Termine.",