Vue: Date filter

updated: 12.09.2021
<template>
  <div>
    {{date | dateFormat}}
  </div>
</template>
<script>
export default {
  filters: {
    dateFormat (date) {
      const options = {
        era: 'long',
        year: 'numeric',
        month: 'long',
        day: 'numeric',
        weekday: 'long',
        timezone: 'UTC'
        hour: 'numeric',
        minute: 'numeric',
        second: 'numeric',
      }
      return new Date(date).toLocaleString('ru', options)
    }
  },
}
</script>