mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 07:09:24 +02:00
Use shorter format for ago dates
This commit is contained in:
parent
666aaf0177
commit
6cfad07870
2 changed files with 19 additions and 3 deletions
|
@ -17,7 +17,15 @@ export function ago (date, locale) {
|
|||
locale = locale || 'en'
|
||||
const m = moment(date)
|
||||
m.locale(locale)
|
||||
return m.fromNow()
|
||||
return m.calendar(null, {
|
||||
sameDay: 'LT',
|
||||
nextDay: 'L',
|
||||
nextWeek: 'L',
|
||||
lastDay: 'L',
|
||||
lastWeek: 'L',
|
||||
sameElse: 'L'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
Vue.filter('ago', ago)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue