Jalaali Moment.js filters for your Vue.js project. This project is based on vue-moment and moment-jalaali.
You can install it via NPM:
npm install vue-moment-jalaali
And require plugin like so:
Vue.use(require('vue-moment-jalaali'));
or load vue-moment-jalaali.min.js
along with moment-jalaali.js
the old fashioned way.
Simply set moment
as the filtering function and you're good to go. At least one argument is expected, which the filter assumes to be a format
string if the argument doesn't match any of the other filtering methods.
<span>{{ someDate | moment("jYYYY/jM/jD HH:mm") }}</span>
<!-- or create a new date from 'now' -->
<span>{{ new Date() | moment("jYYYY/jM/jD HH:mm") }}</span>
<span>{{ someDate | moment "jYYYY/jM/jD HH:mm" }}</span>
<!-- or create a new date from 'now' -->
<span>{{ new Date() | moment "jYYYY/jM/jD HH:mm" }}</span>
For more information, usage and format, you can see these repositories: