Added year filter

This commit is contained in:
Eliot Berriot 2018-03-07 23:02:33 +01:00
parent 99a91c1e74
commit 7e593ad05b
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
2 changed files with 14 additions and 1 deletions

View file

@ -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)
}