Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
windows-iana
Advanced tools
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).
Add the dependency to your project with npm install --save windows-iana
or
yarn add windows-iana
.
The library exports:
findIana()
: returns an array of possible IANA time zones (including all their
aliases) for a given Windows zone.findWindows()
: returns an array of possible Windows time zones for a given IANA
zone and all its aliases.findIanaAliases()
: returns an array of IANA aliases for a given IANA zone
name, including the one passed as a parameter.IANA_ALIAS_MAP
: the IANA alias map used by the library.WINDOWS_TO_IANA_MAP
: the Windows to IANA map used by the library.findIana()
import { findIana } from 'windows-iana';
const result = findIana('Romance Standard Time');
console.log(result); // ['Europe/Paris', 'Europe/Brussels', 'Europe/Copenhagen', 'Europe/Madrid', 'Africa/Ceuta']
You may also pass the territory code as a second parameter (have a look at the mapping by unicode.org for more details).
import { findOneIana } 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']
findIanaAliases()
import { findIanaAliases } from 'windows-iana';
const result = findIanaAliases('Asia/Ho_Chi_Minh');
console.log(result); // ['Asia/Saigon', 'Asia/Ho_Chi_Minh']
FAQs
A small tool to convert between Windows time zones and IANA
The npm package windows-iana receives a total of 30,603 weekly downloads. As such, windows-iana popularity was classified as popular.
We found that windows-iana demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.