Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tease

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

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.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Tease

Pipeline

Version: 1.0.1
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.

Keywords

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc