pull/1/head
yflory 4 years ago
parent 362a439cb5
commit 656ebf432e

@ -483,21 +483,27 @@ define([
var wasRefresh = content.autorefresh; var wasRefresh = content.autorefresh;
content.autorefresh = false; content.autorefresh = false;
var nowDateStr = new Date().toLocaleDateString();
var startDate = new Date(start);
// Missed events // Missed events
if (start < now && missed) { if (start < now && missed) {
return Messages._getKey('reminder_missed', [title, new Date(start).toLocaleString()]); return Messages._getKey('reminder_missed', [title, startDate.toLocaleString()]);
} }
// Starting now // Starting now
if (start < now && wasRefresh) { if (start < now && wasRefresh) {
return Messages._getKey('reminder_now', [title]); return Messages._getKey('reminder_now', [title]);
} }
// In progress, is all day // In progress, is all day
// XXX fix this...
// XXX start and end time may not matter...
// XXX and timezone?
if (start < now && msg.isAllDay) { if (start < now && msg.isAllDay) {
return Messages._getKey('reminder_inProgressAllDay', [title]); return Messages._getKey('reminder_inProgressAllDay', [title]);
} }
// In progress, normal event // In progress, normal event
if (start < now) { if (start < now) {
return Messages._getKey('reminder_inProgress', [title, new Date(start).toLocaleString()]); return Messages._getKey('reminder_inProgress', [title, startDate.toLocaleString()]);
} }
// Not started yet // Not started yet
@ -510,8 +516,6 @@ define([
} }
// Not today: show full date // Not today: show full date
var nowDateStr = new Date().toLocaleDateString();
var startDate = new Date(start);
if (nowDateStr !== startDate.toLocaleDateString()) { if (nowDateStr !== startDate.toLocaleDateString()) {
return Messages._getKey('reminder_date', [title, startDate.toLocaleString()]); return Messages._getKey('reminder_date', [title, startDate.toLocaleString()]);
} }

Loading…
Cancel
Save