fb-moment-tzparser
v1.0.3
Published
Parses `timezone_id` from Facebook to the timezone_identifier_string `moment-timezone` package uses.
Downloads
2
Readme
Facebook to Moment Timezone Parser
Description
Parses timezone_id from Facebook to the timezone_identifier_string moment-timezone package uses.
Installation
npm install --save fb-moment-tzparser
How to use
moment = require('moment-timezone');
tzParser = require('fb-moment-tzparser');
// fb_tz_id = 7
moment_tz_id = tzParser.parse(fb_tz_id);
// moment_tz_id = 'America/New_York'
timeNowInNY = moment.tz(moment_tz_id);
Notes (Facebook timezones not found in Moment-Timezone)
| Facebook Timezone | Default Moment Timezone | | --- | --- | | TZ_ASIA_BAHRAIN | Asia/Qatar | | TZ_ASIA_KUWAIT | Asia/Riyadh | | TZ_ASIA_MUSCAT | Asia/Dubai | | TZ_EUROPE_BRATISLAVA | Europe/Prague | | TZ_EUROPE_LJUBLJANA | Europe/Belgrade | | TZ_EUROPE_SARAJEVO | Europe/Belgrade | | TZ_EUROPE_SKOPJE | Europe/Belgrade |