nuxt-community / moment-module

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

Filter functionality #40

Closed zachheine closed 5 years ago

zachheine commented 5 years ago

Is there any plan to add functionality similar to https://github.com/brockpetrie/vue-moment?

If not, is there a way to use them together (vue-moment also uses this.$moment)?

pi0 commented 5 years ago

Hi @zachheine. You can already use $moment in your templates (and yes, it is reactive!):

<div v-text="$moment(...)"></div>
<div>{{ $moment(...) }}</div>
zachheine commented 5 years ago

Thanks @pi0. With vue-moment I was using the filter syntax ({{ event.start | moment('dddd, MMMM Do, h:mm a') }}) which I think is slightly more readable but this works too!