Package Exports
- vue-moment-jalaali
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-moment-jalaali) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
vue-moment-jalaali
Jalaali Moment.js filters for your Vue.js project. This project is based on [vue-moment] (https://github.com/brockpetrie/vue-moment) and [moment-jalaali] (https://github.com/jalaali/moment-jalaali).
Installation
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.
Usage
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.
Vue.js 2.x.x
<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>
Vue.js 1.x.x
<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: