From 656ebf432e8acfe3fde81acc8a075608e1bb2077 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 13 Apr 2021 10:35:22 +0200 Subject: [PATCH] Add XXX --- www/common/notifications.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/www/common/notifications.js b/www/common/notifications.js index f797a984b..2a7f31fbf 100644 --- a/www/common/notifications.js +++ b/www/common/notifications.js @@ -483,21 +483,27 @@ define([ var wasRefresh = content.autorefresh; content.autorefresh = false; + var nowDateStr = new Date().toLocaleDateString(); + var startDate = new Date(start); + // Missed events if (start < now && missed) { - return Messages._getKey('reminder_missed', [title, new Date(start).toLocaleString()]); + return Messages._getKey('reminder_missed', [title, startDate.toLocaleString()]); } // Starting now if (start < now && wasRefresh) { return Messages._getKey('reminder_now', [title]); } // In progress, is all day + // XXX fix this... + // XXX start and end time may not matter... + // XXX and timezone? if (start < now && msg.isAllDay) { return Messages._getKey('reminder_inProgressAllDay', [title]); } // In progress, normal event if (start < now) { - return Messages._getKey('reminder_inProgress', [title, new Date(start).toLocaleString()]); + return Messages._getKey('reminder_inProgress', [title, startDate.toLocaleString()]); } // Not started yet @@ -510,8 +516,6 @@ define([ } // Not today: show full date - var nowDateStr = new Date().toLocaleDateString(); - var startDate = new Date(start); if (nowDateStr !== startDate.toLocaleDateString()) { return Messages._getKey('reminder_date', [title, startDate.toLocaleString()]); }