From 580d94bade0c102167d0c67f8d174d5d34dbb799 Mon Sep 17 00:00:00 2001 From: Brock Reece Date: Wed, 29 Nov 2017 17:05:13 +0000 Subject: [PATCH 1/4] Add timezone docs --- readme.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/readme.md b/readme.md index 279a34b..4ee2c85 100644 --- a/readme.md +++ b/readme.md @@ -134,6 +134,26 @@ 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 certian 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 moment from 'moment-timezone' + +Vue.use(VueMoment, { + moment, +}) +``` + +For more information about `moment#timezone`, check out . ## Chaining From e0ac2ef9f11b7041e51b3f7eebb627083c34805a Mon Sep 17 00:00:00 2001 From: Brock Reece Date: Wed, 29 Nov 2017 17:19:32 +0000 Subject: [PATCH 2/4] Update readme.md --- readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.md b/readme.md index 4ee2c85..6d450f5 100644 --- a/readme.md +++ b/readme.md @@ -146,6 +146,8 @@ Convert the date to a certian timezone ```js // main.js +import Vue from 'vue' +import VueMoment from 'vue-moemnt' import moment from 'moment-timezone' Vue.use(VueMoment, { From 533e9f3cd27ff2b059f22afbc9770094fd5fa907 Mon Sep 17 00:00:00 2001 From: Brock Reece Date: Wed, 29 Nov 2017 17:25:40 +0000 Subject: [PATCH 3/4] Fix typo --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 6d450f5..d259ae1 100644 --- a/readme.md +++ b/readme.md @@ -136,7 +136,7 @@ For more information about `moment#subtract`, check out {{ date | moment('timezone', 'America/Los_Angeles', 'LLLL ss')}} From e0f9d7f593665bffa7aab7e5026622f9c7472b76 Mon Sep 17 00:00:00 2001 From: Brock Petrie Date: Thu, 30 Nov 2017 14:22:46 -0600 Subject: [PATCH 4/4] Fix readme typo --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index d259ae1..4a6db1c 100644 --- a/readme.md +++ b/readme.md @@ -147,7 +147,7 @@ Convert the date to a certain timezone ```js // main.js import Vue from 'vue' -import VueMoment from 'vue-moemnt' +import VueMoment from 'vue-moment' import moment from 'moment-timezone' Vue.use(VueMoment, { @@ -157,6 +157,7 @@ Vue.use(VueMoment, { For more information about `moment#timezone`, check out . + ## Chaining There's some built-in (and not thoroughly tested) support for chaining, like so: @@ -168,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 .