Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

moment-timezone-micro

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moment-timezone-micro

Tiny module for date format and timezone conversion with daylight saving time support.

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
37
-27.45%
Maintainers
1
Weekly downloads
 
Created
Source

Moment Timezone Micro

NPM version NPM downloads Build Status

Tiny module (4kb) for date format and timezone conversion with Daylight Saving Time support.

Created from moment and moment-timezone.

Timezone conversion is done using as input a timezone data string.

This strings are available in moment-time module.

They can be found at https://github.com/moment/moment-timezone/blob/develop/data/packed/latest.json

var moment = require('moment-timezone-micro');
var timezone = new moment.Timezone("Etc/UTC|UTC|0|0|");
moment.format(Date.now(), "MM/DD/YYYY HH:mm:ss.SSS Z", timezone);

This timezone string can be supplied to a lightweigth client on setting params or fetched from a server running complete moment-timezone with all timezone database available.

TODO:

  • Example showing how to get timezone data string from moment-timezone programatically
  • Implement parsing if do not increase too much the module size

Keywords

timezone

FAQs

Package last updated on 12 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts