A TypeScript library for mapping between IANA and Windows time zones
npm install winzones> A TypeScript library for mapping between IANA and Windows time zones



This library uses timezone mapping data from the Unicode Common Locale Data Repository (CLDR), specifically the Windows timezone mappings. The data is regularly updated to reflect the latest timezone changes and Windows zone mappings.
We update this data regularly with new CLDR releases to ensure accuracy and completeness.
``bash`
npm install winzones
`typescript
import { findWindowsFromIana, findIanaFromWindows } from 'winzones';
// Convert IANA timezone to Windows
const windowsZone = findWindowsFromIana('America/New_York');
console.log(windowsZone); // 'Eastern Standard Time'
// Convert Windows timezone to IANA (returns array as one Windows zone can map to multiple IANA zones)
const ianaZones = findIanaFromWindows('Eastern Standard Time');
console.log(ianaZones); // ['America/New_York', 'America/Detroit', 'America/Toronto', ...]
// Handle cases where timezone is not found
const unknownZone = findWindowsFromIana('Invalid/Timezone');
console.log(unknownZone); // undefined
`
Finds the Windows timezone equivalent for an IANA timezone identifier.
- Parameters: ianaTimezone - IANA timezone identifier (e.g., 'America/New_York')undefined
- Returns: Windows timezone name (e.g., 'Eastern Standard Time') or if not found
Finds the IANA timezone equivalents for a Windows timezone.
- Parameters: windowsTimezone - Windows timezone name (e.g., 'Eastern Standard Time')undefined
- Returns: Array of IANA timezone identifiers or if not found
`bashInstall dependencies
npm install
MIT © Execify
James Birtles