New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tease

Time zones with offsets and canonical links from the IANA Time Zone Database

1.0.0
74

Supply Chain Security

100

Vulnerability

92

Quality

75

Maintenance

100

License

Unpopular package

Quality

This package is not very popular.

Found 1 instance in 1 package

Version published
Weekly downloads
35
9.38%
Maintainers
1
Weekly downloads
 
Created

Tease

Pipeline

Version: 1.0.0
Master build: Master branch build status

$ npm install tease

This library provides basic time zone information with UTC and DST offsets and canonical links from the IANA Time Zone Database. It can be installed in whichever way you prefer, but I recommend NPM.

Documentation

var tease = require('tease');

tease.all();
// {
//     "Europe/London": {"utc":"+00:00", "dst":"+01:00", "link":null},
//     "US/Eastern": {"utc":"-05:00", "dst":"-04:00", "link":"America/New_York"},
//     "UTC": {"utc":"+00:00", "dst":"+00:00", "link":null},
//     ...
// }

tease.ids();
// [
//     "Europe/London",
//     "US/Eastern",
//     "UTC",
//     ...
// ]

tease.get('US/Eastern');
// {"utc":"-05:00", "dst":"-04:00", "link":"America/New_York"}

tease.get('US/Eastern', /*canonical*/ true) === tease.get('America/New_York');
// true

tease.utc('US/Eastern');
// "-05:00"

tease.dst('US/Eastern');
// "-04:00"

tease.has('US/Eastern');
// true

tease.has('Planet/Mars');
// false

Contributing

I accept contributions to the source via Pull Request, but passing unit tests must be included before it will be considered for merge.

$ curl -O https://raw.githubusercontent.com/adlawson/vagrantfiles/master/nodejs/Vagrantfile
$ vagrant up
$ vagrant ssh
$ cd /srv

$ npm test

License

The content of this library is released under the MIT License by Andrew Lawson.
You can find a copy of this license in LICENSE or at http://www.opensource.org/licenses/mit.

FAQs

Package last updated on 29 Jul 2014

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