fix time display for comments
This commit is contained in:
parent
1a9435a3de
commit
d387699f67
@ -972,14 +972,7 @@ function formReadable(input) {
|
|||||||
var re = comments.length-k-1;
|
var re = comments.length-k-1;
|
||||||
resort[re] = {"comment":comments[k].comment,"date":null,"user":null};
|
resort[re] = {"comment":comments[k].comment,"date":null,"user":null};
|
||||||
resort[re].user = Meteor.users.findOne({_id:comments[k].user}).profile.name;
|
resort[re].user = Meteor.users.findOne({_id:comments[k].user}).profile.name;
|
||||||
resort[re].date = moment(comments[k].date).calendar(null, { //change to time if recently posted
|
resort[re].date = moment(comments[k].date).fromNow();
|
||||||
sameDay: '[Today]',
|
|
||||||
nextDay: '[Tomorrow]',
|
|
||||||
nextWeek: 'dddd',
|
|
||||||
lastDay: '[Yesterday]',
|
|
||||||
lastWeek: '[Last] dddd',
|
|
||||||
sameElse: 'MMMM Do'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
input.comments = resort;
|
input.comments = resort;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user