diff --git a/front/src/filters.js b/front/src/filters.js index 1ec4f2307..22d93149b 100644 --- a/front/src/filters.js +++ b/front/src/filters.js @@ -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) }