Skip to content

Commit

Permalink
Merge pull request #56 from brockpetrie/timezone-readme
Browse files Browse the repository at this point in the history
Add timezone docs
  • Loading branch information
brockpetrie authored Nov 30, 2017
2 parents 2613a2d + e0f9d7f commit 08c474a
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://momentjs.com/docs/#/manipulating/subtract/>.

### timezone

Convert the date to a certain timezone

```html
<span>{{ date | moment('timezone', 'America/Los_Angeles', 'LLLL ss')}}</span>
```

**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 <https://momentjs.com/timezone/docs/#/using-timezones/converting-to-zone/>.


## Chaining

Expand All @@ -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 <http://momentjs.com/docs/#/customization/>.
Expand Down

0 comments on commit 08c474a

Please sign in to comment.