Moment format filter
This commit is contained in:
parent
2cd90ff4bd
commit
d0a9873a07
|
@ -28,6 +28,13 @@ export function ago (date) {
|
||||||
|
|
||||||
Vue.filter('ago', ago)
|
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) {
|
export function capitalize (str) {
|
||||||
return str.charAt(0).toUpperCase() + str.slice(1)
|
return str.charAt(0).toUpperCase() + str.slice(1)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue