@skybloxsystems/ticket-bot
Version:
69 lines (46 loc) • 3.06 kB
Markdown
for Moment.js
Moment-Timezone is an add-on for Moment.js. Both are considered legacy projects, now in maintenance mode. In most cases, you should choose a different library.
For more details and recommendations, please see [Project Status](https://momentjs.com/docs/#/-project-status/) in the Moment docs.
*Thank you.*
- [Documentation](https://momentjs.com/timezone/docs/)
- [Changelog](changelog.md)
- [Stack Overflow](https://stackoverflow.com/questions/tagged/moment-timezone)
```js
var june = moment("2014-06-01T12:00:00Z");
june.tz('America/Los_Angeles').format('ha z'); // 5am PDT
june.tz('America/New_York').format('ha z'); // 8am EDT
june.tz('Asia/Tokyo').format('ha z'); // 9pm JST
june.tz('Australia/Sydney').format('ha z'); // 10pm EST
var dec = moment("2014-12-01T12:00:00Z");
dec.tz('America/Los_Angeles').format('ha z'); // 4am PST
dec.tz('America/New_York').format('ha z'); // 7am EST
dec.tz('Asia/Tokyo').format('ha z'); // 9pm JST
dec.tz('Australia/Sydney').format('ha z'); // 11pm EST
```
Moment-timezone is freely distributable under the terms of the [MIT license][license-url].
[![FOSSA Status][fossa-large-image]][fossa-large-url]
[ ]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat
[ ]: LICENSE
[ ]: https://npmjs.org/package/moment-timezone
[ ]: https://img.shields.io/npm/v/moment-timezone.svg?style=flat
[ ]: https://img.shields.io/npm/dm/moment-timezone.svg?style=flat
[ ]: https://npmcharts.com/compare/moment-timezone?minimal=true
[ ]: https://travis-ci.org/moment/moment-timezone
[ ]: https://img.shields.io/travis/moment/moment-timezone/develop.svg?style=flat
[ ]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment-timezone.svg?type=shield
[ ]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment-timezone?ref=badge_shield
[ ]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment-timezone.svg?type=large
[ ]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment-timezone?ref=badge_large
[ ]: https://api.dependabot.com/badges/compatibility_score?dependency-name=moment-timezone&package-manager=npm_and_yarn&version-scheme=semver
[ ]: https://dependabot.com/compatibility-score.html?dependency-name=moment-timezone&package-manager=npm_and_yarn&version-scheme=semver
[![NPM version][npm-version-image]][npm-url]
[![NPM downloads][npm-downloads-image]][npm-download-url]
[![MIT License][license-image]][license-url]
[![Build Status][travis-image]][travis-url]
[![FOSSA Status][fossa-badge-image]][fossa-badge-url]
[![SemVer compatibility][semver-image]][semver-url]
IANA Time zone support