2.0.1 • Published 6 years ago

moment-timezone-parse v2.0.1

Weekly downloads
25
License
ISC
Repository
github
Last release
6 years ago

Moment Timezone Parse

Parse the timezone component of a ISO8601 date string and return an approparite IANA timezone name.

Build Status

Installation

npm install moment-timezone-parse --save

Usage

const parse      = require('moment-timezone-parse');
console.log(parse('2017-11-08T23:16:00-0200').format());
// =>
// Etc/GMT+2

How it works

The timezone designator (i.e. -0200) is parsed from the string and a timezone name is derived from that string (i.e. Etc/GMT+2).