moment-timezone-micro

0.1.1 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    29
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    29
  • 0.1.0
    0
  • 0.0.2
    0

Package Sidebar

Install

npm i moment-timezone-micro

Weekly Downloads

29

Version

0.1.1

License

MIT

Last publish

Collaborators

  • surfdude