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

windows-iana

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

windows-iana

A small tool to convert Windows time zones to IANA

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

windows-iana

Build Status Coverage Status

This library exports two functions to help convert from Windows time zones to IANA time zones (based on this mapping definition).

Installation

Add the dependency to your project with npm install --save windows-iana or yarn add windows-iana.

Usage

The library exports findIana(), which will return an array of possible IANA time zones, or findOneIana(), which will return just one string.

findOneIana()

import { findOneIana } from "windows-iana";

const result = findOneIana("Romance Standard Time");
console.log(result); // "Europe/Paris"

You may also pass the territory code as a second parameter (have a look again at the mapping by unicode.org for more details).

import { findOneIana } from "windows-iana";

const result = findOneIana("Romance Standard Time", "ES");
console.log(result); // "Europe/Madrid"

findIana()

import { findIana } from "windows-iana";

const result = findIana("Romance Standard Time");
console.log(result); // ["Europe/Paris"]

You may also pass the territory code to findIana().

import { findIana } from "windows-iana";

const result = findIana("Romance Standard Time", "ES");
console.log(result); // ["Europe/Madrid", "Africa/Ceuta"]

FAQs

Package last updated on 19 Oct 2017

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