@instructure/timezone

1.0.31 • Public • Published

This is a fork of (Bigeasy's Timezone library)[https://github.com/bigeasy/timezone].

The original library uses eggert/tz to generate up-to-date timezone information, but the library is not maintained anymore. This fork uses (@instructure/timezone)[https://github.com/instructure/timezone]

If time zones ever get out of sync again, do the following...

git clone --recurse-submodules [@instructure/timezone URL]
cd timezone
cd eggert/tz
git checkout [Last updated version number from moment-timezone, e.g. 2023c]
# update package.json version number
npm install
make publish # publishes to NPM
git add .
# commit and push git changes

Sundial

Timezone Build Status

Format time in JavaScript using the IANA time zone database. (Photo: Sundial by Wolfgang Staudt.)

var tz = require('timezone/loaded'),
    equal = require('assert').equal,
    utc;

// Get POSIX time in UTC.
utc = tz('2012-01-01');

// Convert UTC time to local time in a localize language.
equal(tz(utc, '%c', 'fr_FR', 'America/Montreal'),
      'sam. 31 déc. 2011 19:00:00 EST');

A full-featured time zone aware date formatter for JavaScript.

  • Timezone is a MicroJS library in pure JavaScript with no dependencies that provides timezone aware date math and date formatting.
  • Timezone uses the IANA Database to determine the correct wall clock time anywhere in the world for any time since the dawn of standardized time.
  • Timezone formats dates with a full implementation of strftime formats, including the GNU date extensions.
  • Timezone represents time in POSIX time and local time using RFC 3999 date strings.
  • Timezone is a full featured standards based time library in pure JavaScript for under 3K minified and gzipped.

Hacking

$ git clone --quiet https://github.com/bigeasy/timezone.git
$ cd timezone && make && npm install && npm test

License

The MIT License.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.319latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.319
1.0.30547
1.0.292
1.0.2829
1.0.270
1.0.260
1.0.250
1.0.240

Package Sidebar

Install

npm i @instructure/timezone

Weekly Downloads

587

Version

1.0.31

License

MIT

Unpacked Size

1.71 MB

Total Files

668

Last publish

Collaborators

  • dmz985
  • aaronshaf
  • zsotllengyelinst
  • jozsefg-instructure
  • bpjatacsuk
  • ajmal-esa
  • razorsh4rk
  • david.wenzlick.inst
  • robinkuss64
  • ardena
  • jcflow
  • jguardadom
  • jdewar
  • xcudder
  • ericsaupe
  • joyenjoyer
  • omarpr
  • cguanzon-inst
  • sarahgerard
  • jacksonhowe
  • jakeoeding
  • camray
  • cjs118
  • matyas.szabo
  • herrtopi
  • angela.gomba
  • kyler-instructure
  • instuici
  • eschiebel
  • maths22
  • jcrystal
  • itadmins
  • quizzesuici
  • instructure-toolsmiths-service-user
  • aogata-inst
  • instout