mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 17:18:07 +02:00
Moment format filter
This commit is contained in:
parent
2cd90ff4bd
commit
d0a9873a07
1 changed files with 7 additions and 0 deletions
|
@ -28,6 +28,13 @@ export function ago (date) {
|
|||
|
||||
Vue.filter('ago', ago)
|
||||
|
||||
export function momentFormat (date, format) {
|
||||
format = format || 'lll'
|
||||
return moment(date).format(format)
|
||||
}
|
||||
|
||||
Vue.filter('moment', momentFormat)
|
||||
|
||||
export function capitalize (str) {
|
||||
return str.charAt(0).toUpperCase() + str.slice(1)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue