13 lines
238 B
TypeScript
13 lines
238 B
TypeScript
import Vue from 'vue'
|
|
|
|
Vue.filter('formatDate', (s: string) => {
|
|
return s
|
|
? new Date(s).toLocaleDateString([], {
|
|
year: 'numeric',
|
|
month: 'long',
|
|
day: 'numeric',
|
|
weekday: 'short',
|
|
})
|
|
: ''
|
|
})
|