Merge pull request #3767 from JamesClarke01/AgendaDayFix
agenda: Fixed bug where "Today" and "Tomorrow" labels display in non-current weeks.master
commit
5a20b48a4c
|
|
@ -16,3 +16,4 @@
|
|||
0.14: Fixed "Today" and "Yesterday" wrongly displayed for allDay events on some time zones
|
||||
0.15: Minor code improvements
|
||||
0.16: Correct date for all day events in negative timezones, improve locale display
|
||||
0.17: Fixed "Today" and "Tomorrow" labels displaying in non-current weeks
|
||||
|
|
|
|||
|
|
@ -44,11 +44,12 @@ function formatDay(date) {
|
|||
return formattedDate;
|
||||
}
|
||||
const today = new Date(Date.now());
|
||||
if (date.getDay() == today.getDay() && date.getMonth() == today.getMonth())
|
||||
if (date.getDate() == today.getDate())
|
||||
return /*LANG*/"Today ";
|
||||
else {
|
||||
const tomorrow = new Date(Date.now() + 86400 * 1000);
|
||||
if (date.getDay() == tomorrow.getDay() && date.getMonth() == tomorrow.getMonth()) {
|
||||
var tomorrow = new Date();
|
||||
tomorrow.setDate(tomorrow.getDate() + 1);
|
||||
if (date.getDate() == tomorrow.getDate()) {
|
||||
return /*LANG*/"Tomorrow ";
|
||||
}
|
||||
return formattedDate;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "agenda",
|
||||
"name": "Agenda",
|
||||
"version": "0.16",
|
||||
"version": "0.17",
|
||||
"description": "Simple agenda",
|
||||
"icon": "agenda.png",
|
||||
"screenshots": [{"url":"screenshot_agenda_overview.png"}, {"url":"screenshot_agenda_event1.png"}, {"url":"screenshot_agenda_event2.png"}],
|
||||
|
|
|
|||
Loading…
Reference in New Issue