nuxt-community / moment-module

Efficient Moment.js integration for Nuxt
MIT License
195 stars 12 forks source link

How to update en locale s relative time settings using this module? #69

Closed slidenerd closed 4 years ago

slidenerd commented 4 years ago
slidenerd commented 4 years ago
export default (context) => {
  context.$moment.updateLocale('en', {
    relativeTime: {
      future: '%s',
      past: '%s',
      s: '1 s',
      ss: '%d seconds',
      m: '1 m',
      mm: '%d m',
      h: '1 h',
      hh: '%d h',
      d: '1 d',
      dd: '%d d',
      M: '1 M',
      MM: '%d M',
      y: '1 Y',
      yy: '%d Y',
    },
  })
}

FIXED Make a plugin out of it