mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 04:59:23 +02:00
Fix #670: Use proper locale for date-related/duration strings
This commit is contained in:
parent
e4cb036a97
commit
7d003282eb
7 changed files with 45 additions and 25 deletions
|
@ -13,8 +13,10 @@ export function truncate (str, max, ellipsis) {
|
|||
|
||||
Vue.filter('truncate', truncate)
|
||||
|
||||
export function ago (date) {
|
||||
export function ago (date, locale) {
|
||||
locale = locale || 'en'
|
||||
const m = moment(date)
|
||||
m.locale(locale)
|
||||
return m.fromNow()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue