windows-iana

WebJar for windows-iana

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

windows-iana
Последняя версия

Последняя версия

3.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

windows-iana
WebJar for windows-iana
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/rubenillodo/windows-iana

Скачать windows-iana

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/windows-iana/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>windows-iana</artifactId>
    <version>3.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/windows-iana/
implementation 'org.webjars.npm:windows-iana:3.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/windows-iana/
implementation ("org.webjars.npm:windows-iana:3.1.0")
'org.webjars.npm:windows-iana:jar:3.1.0'
<dependency org="org.webjars.npm" name="windows-iana" rev="3.1.0">
  <artifact name="windows-iana" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='windows-iana', version='3.1.0')
)
libraryDependencies += "org.webjars.npm" % "windows-iana" % "3.1.0"
[org.webjars.npm/windows-iana "3.1.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

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 and this list of IANA aliases).

Installation

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

Usage

The library exports:

  • findIana(): will return an array of possible IANA time zones, including all their aliases.
  • findOneIana(): will return just one string.
  • findWindows(): will return a string with a Windows time zone.
  • findAlias(): will an array of all IANA aliases, including the one passed as a parameter.
  • getAllIanaWindowsMap(): will return an map of all IANA time zones as key, and a Windows time zone as value.

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"]

findWindows()

import { findWindows } from "windows-iana";

const result = findWindows("America/New_York");
console.log(result); // Eastern Standard Time

There is no territory code for this function because all IANA names map to exactly one territory.

findAlias()

import { findAlias } from "windows-iana";

const result = findAlias("America/New_York");
console.log(result); // ["America/New_York", "US/Eastern"]

getAllIanaWindowsMap()

import { getAllIanaWindowsMap } from "windows-iana";

const result = getAllIanaWindowsMap();
console.log(result.get('America/New_York')); // Eastern Standard Time

Версии библиотеки

Версия
3.1.0