vue-moment: Moment.js filters for Vue.js


With Moment.js you can parse, validate, manipulate, and display dates in JavaScript.

By Using vue-moment along with moment.js you can filter dates in the desired format in your HTML files.

Usage example

moment is the filtering function. You can use the default filtering option which takes a string of tokens and replaces them with their corresponding values. See more at

<span>{{ someDate | moment "YYYY" }}</span>
<!-- e.g. "2010" -->
<span>{{ someDate | moment "ddd, hA" }}</span>
<!-- e.g. "Sun, 3PM" -->
<span>{{ someDate | moment "dddd, MMMM Do YYYY, h:mm:ss a" }}</span>
<!-- e.g. "Sunday, February 14th 2010, 3:25:50 pm" -->

Created by Brock Petrie