@@ -27,16 +27,6 @@ function Hallway (sites) {
28 // Entries
28 // Entries
30− function compare (a, b) {
31− if (a.date < b.date) {
34− if (a.date > b.date) {
40 this.sortEntries = function () {
30 this.sortEntries = function () {
41 const a = []
31 const a = []
42 for (const id in feeds) {
32 for (const id in feeds) {
@@ -46,7 +36,7 @@ function Hallway (sites) {
46 a.push(entry)
36 a.push(entry)
49− return a.sort(compare)
39+ return a.sort(compare).reverse()
52 this.templateEntry = function (entry) {
42 this.templateEntry = function (entry) {
@@ -98,6 +88,10 @@ function Hallway (sites) {
91+ function compare (a, b) {
92+ return a.date < b.date ? -1 : a.date > b.date ? 1 : 0
101 function parseFeed (author, feed) {
95 function parseFeed (author, feed) {
102 const lines = feed.split('\n')
96 const lines = feed.split('\n')
103 const entries = []
97 const entries = []
@@ -138,6 +132,7 @@ function Hallway (sites) {
138 } else if (isYesterday) {
132 } else if (isYesterday) {
139 return 'yesterday'
133 return 'yesterday'
141 return `${Math.floor(minutes / 1440)} days ago`
136 return `${Math.floor(minutes / 1440)} days ago`