# @js-joda/timezone

> iana tzdb timezone bindings for js-joda

Latest version **2.25.2** (published 2026-07-10) · BSD-3-Clause license · 383.4K weekly downloads

## Install

```sh
npm install @js-joda/timezone
pnpm add @js-joda/timezone
yarn add @js-joda/timezone
bun add @js-joda/timezone
```

## Health

**Score 85/100 (A)** — status: active.

Positive: moderate downloads; has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

## Facts

| | |
|---|---|
| Version | 2.25.2 |
| Published | 2026-07-10 |
| First published | 2019-06-30 |
| Weekly downloads | 383.4K |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1664 |
| Author | pithu |
| Maintainers | phueper, pithu |
| Keywords | date, time, timezone |

## Links

- npm: https://www.npmjs.com/package/@js-joda/timezone
- Repository: https://github.com/js-joda/js-joda
- Homepage: https://js-joda.github.io/js-joda
- Issues: https://github.com/js-joda/js-joda/issues
- npm.io page: https://npm.io/package/@js-joda/timezone

## Alternatives

- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads
- [@hebcal/hdate](https://npm.io/package/@hebcal/hdate.md) — 45.1K weekly downloads

## Recent versions

- 2.25.2 (latest) — 2026-07-10
- 2.25.1 — 2026-04-08
- 2.25.0 — 2026-03-28
- 2.24.0 — 2026-03-27
- 2.23.0 — 2026-01-22
- 2.22.0 — 2025-03-31
- 2.21.2 — 2025-01-10
- 2.21.1 — 2024-06-18
- 2.21.0 — 2024-04-19
- 2.20.0 — 2024-04-19
- 2.19.0 — 2024-04-19
- 2.18.3 — 2024-03-13
- 2.18.2 — 2023-10-12
- 2.18.1 — 2023-10-10
- 2.18.0 — 2023-04-12
- … 25 more at https://npm.io/package/@js-joda/timezone/versions

## README

# @js-joda/timezone

[![npm version](https://badge.fury.io/js/%40js-joda%2Ftimezone.svg)](https://badge.fury.io/js/%40js-joda%2Ftimezone)
[![GH Actions Build Status](https://github.com/js-joda/js-joda/actions/workflows/tests.yaml/badge.svg?branch=main)](https://github.com/js-joda/js-joda/actions)
[![Coverage Status](https://coveralls.io/repos/js-joda/js-joda/badge.svg?branch=main&service=github)](https://coveralls.io/github/js-joda/js-joda?branch=main)
[![Downloads/Month](https://img.shields.io/npm/dm/%40js-joda%2Ftimezone.svg)](https://img.shields.io/npm/dm/%40js-joda%2Ftimezone.svg)


## Motivation

Implementation of the js-joda ZoneRulesProvider, providing the 
bindings to the iana tzdb, using latest zone file generated by moment-timezone

The package doesn't export anything but it still has to be imported for side effects.

## Usage

### Node

Install joda using npm

    npm install @js-joda
    npm install @js-joda/timezone

### es5

    var jsJoda = require('@js-joda/core')
    require('@js-joda/timezone')
    
    var { LocalDateTime, ZoneId, ZonedDateTime } = jsJoda;
         
    LocalDateTime
        .parse('2016-06-30T11:30')
        .atZone(ZoneId.of('Europe/Berlin'))
        .toString()  // 2016-06-30T11:30+02:00[Europe/Berlin]
         
    ZonedDateTime
        .parse('2016-06-30T11:30+02:00[Europe/Berlin]') 
        .withZoneSameInstant(ZoneId.of('America/New_York'))
        .toString() // 2016-06-30T05:30-04:00[America/New_York]

    ZonedDateTime
        .parse('2016-06-30T11:30+02:00[Europe/Berlin]')
        .withZoneSameLocal(ZoneId.of('America/New_York'))
        .toString() // 2016-06-30T11:30-04:00[America/New_York]

### es6 / typescript

    import { ZonedDateTime, ZoneId } from '@js-joda/core'
    import '@js-joda/timezone'
    
    const zdt = ZonedDateTime.now(ZoneId.of('America/New_York'))

### Browser

    <script src="./packages/core/dist/js-joda.js"></script>
    <script src="./packages/timezone/dist/js-joda-timezone.js"></script>
    <script>
        // copy all js-joda classes to the global scope
        for(let key in JSJoda) { this[key] = JSJoda[key]; }
            
        LocalDateTime
            .parse('2016-06-30T11:30')
            .atZone(ZoneId.of('Europe/Berlin'))
            .toString()  // 2016-06-30T11:30+02:00[Europe/Berlin]
             
        ZonedDateTime
            .parse('2016-06-30T11:30+02:00[Europe/Berlin]') 
            .withZoneSameInstant(ZoneId.of('America/New_York'))
            .toString() // 2016-06-30T05:30-04:00[America/New_York]
    
        ZonedDateTime
            .parse('2016-06-30T11:30+02:00[Europe/Berlin]')
            .withZoneSameLocal(ZoneId.of('America/New_York'))
            .toString() // 2016-06-30T11:30-04:00[America/New_York]
    </script>

## Reducing js-joda-timezone file size
If you don't need all the historical data that @js-joda/timezone provides, you can instead use one of the reduced files ize builds:

* `js-joda-timezone-10-year-range.js` covers +- five years from the current version's release
* `js-joda-timezone-1970-2030.js` covers from 1970 to 2030
* `js-joda-timezone-2012-2022.js` covers from 2012 to 2022 // deprecated, will be removed in future releases
* `js-joda-timezone-2017-2027.js` covers from 2017 to 2027 

To use one of these, just change your import path to the following format:

    import '@js-joda/timezone/dist/js-joda-timezone-1970-2030'

## Implementation details

* This ZoneRulesProvider implemantion supplies all functionality that is required by the js-joda package. 
* Additional [ZoneRules](https://js-joda.github.io/js-joda/esdoc/class/src/zone/ZoneRules.js~ZoneRules.html) functionality like [transitions(), etc.](https://github.com/js-joda/js-joda-timezone/blob/5288c41433133c248f66c271be59878356db9ea8/test/MomentZoneRulesTest.js#L310-L322) is not implemented.

## License

* @js-joda/timezone is released under the [BSD 3-clause license](LICENSE):

* The author of joda time and the lead architect of the JSR-310 is Stephen Colebourne.

* The json versions of the iana tzdb are imported from and generated with [moment-timezone](https://github.com/moment/moment-timezone).

---
_Source: https://npm.io/package/@js-joda/timezone · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
