diff --git a/readme.md b/readme.md index 279a34b..4a6db1c 100644 --- a/readme.md +++ b/readme.md @@ -134,6 +134,29 @@ Works the same as `add`, but mutates the original moment by subtracting time. For more information about `moment#subtract`, check out . +### timezone + +Convert the date to a certain timezone + +```html +{{ date | moment('timezone', 'America/Los_Angeles', 'LLLL ss')}} +``` + +**To use this filter you will need to pass `moment-timezone` through to the plugin** + +```js +// main.js +import Vue from 'vue' +import VueMoment from 'vue-moment' +import moment from 'moment-timezone' + +Vue.use(VueMoment, { + moment, +}) +``` + +For more information about `moment#timezone`, check out . + ## Chaining @@ -146,7 +169,6 @@ There's some built-in (and not thoroughly tested) support for chaining, like so: This would add 2 years and 8 months to the date, then subtract 3 hours, then format the resulting date. - ## Configuration `vue-moment` should respect any global Moment customizations, including i18n locales. For more info, check out .