1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fixes #632 - Show yesterday's episodes in upcoming view

This commit is contained in:
Luke Pulverenti 2013-11-19 12:17:14 -05:00
parent 7fe1a3311d
commit 38d90288e5
2 changed files with 61 additions and 8 deletions

View file

@ -911,6 +911,15 @@
return html;
},
isYesterday: function (date1) {
var today = new Date();
today.setDate(today.getDate() - 1);
return date1.getFullYear() == today.getFullYear() && date1.getDate() == today.getDate();
},
isSameDay: function (date1, date2) {
return date1.getFullYear() == date2.getFullYear() && date1.getDate() == date2.getDate();
@ -934,6 +943,10 @@
return "Today";
}
if (LibraryBrowser.isYesterday(date)) {
return "Yesterday";
}
return weekday[date.getDay()] + " " + date.toLocaleDateString();
},
@ -2396,7 +2409,7 @@
var counts = response1[0];
var liveTvServices = response2[0];
insertViews(page, user, counts, liveTvServices);