Format time, fix sort (#230)
This commit is contained in:
parent
ba10045a0f
commit
c914d94b18
3 changed files with 5 additions and 11 deletions
|
@ -15,12 +15,7 @@ export default {
|
|||
},
|
||||
dynamicTime(time) {
|
||||
const createdAt = moment(time * 1000);
|
||||
return createdAt.calendar(null, {
|
||||
sameDay: 'h:mm A',
|
||||
lastDay: '[Yesterday]',
|
||||
lastWeek: 'ddd',
|
||||
sameElse: 'D MMM',
|
||||
});
|
||||
return createdAt.fromNow();
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue