mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Added "DAYAFTERTOMORROW" tag if available
This commit is contained in:
parent
1194d86460
commit
f5be159187
@ -151,10 +151,14 @@ Module.register("calendar",{
|
||||
} 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) {
|
||||
if (config.language == 'de') {
|
||||
timeWrapper.innerHTML = this.translate("DAYAFTERTOMORROW");
|
||||
/*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();
|
||||
timeWrapper.innerHTML = moment(event.startDate, "x").fromNow();
|
||||
}
|
||||
} else {
|
||||
/* Check to see if the user displays absolute or relative dates with their events
|
||||
|
Loading…
x
Reference in New Issue
Block a user