mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 07:09:24 +02:00
Added year filter
This commit is contained in:
parent
99a91c1e74
commit
7e593ad05b
2 changed files with 14 additions and 1 deletions
|
@ -35,6 +35,12 @@ export function momentFormat (date, format) {
|
|||
|
||||
Vue.filter('moment', momentFormat)
|
||||
|
||||
export function year (date) {
|
||||
return moment(date).year()
|
||||
}
|
||||
|
||||
Vue.filter('year', year)
|
||||
|
||||
export function capitalize (str) {
|
||||
return str.charAt(0).toUpperCase() + str.slice(1)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue