mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Showing 'tomorrow' and future dated stories correctly on the web.
This commit is contained in:
parent
991a9a7d72
commit
c7e203dc1a
1 changed files with 9 additions and 1 deletions
|
@ -121,7 +121,15 @@ NEWSBLUR.Models.Story = Backbone.Model.extend({
|
|||
var midnight = midnight_today();
|
||||
var time = date.format(dateformat == "24" ? "H:i" : "g:ia");
|
||||
if (date > midnight) {
|
||||
return "Today, " + date.format("F jS ") + time;
|
||||
if (date > midnight_tomorrow(midnight)) {
|
||||
if (date < midnight_tomorrow(midnight, 2)) {
|
||||
return "Tomorrow, " + date.format("F jS ") + time;
|
||||
} else {
|
||||
return date.format("d M Y, ") + time;
|
||||
}
|
||||
} else {
|
||||
return "Today, " + date.format("F jS ") + time;
|
||||
}
|
||||
} else if (date > midnight_yesterday(midnight)) {
|
||||
return "Yesterday, " + date.format("F jS ") + time;
|
||||
} else if (date > beginning_of_month()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue