# is-timezone

> Is this string a valid timezone? Validate timezones before using them in node, dates, or new objects.

Latest version **1.0.1** (published 2024-08-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install is-timezone
pnpm add is-timezone
yarn add is-timezone
bun add is-timezone
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2024-08-12 |
| First published | 2022-09-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ryan Miller |
| Maintainers | aerilym |
| Keywords | timezone, is-timezone, validate, tz, valid timezone |

## Links

- npm: https://www.npmjs.com/package/is-timezone
- Repository: https://github.com/Aerilym/is-timezone
- Issues: https://github.com/Aerilym/is-timezone/issues
- npm.io page: https://npm.io/package/is-timezone

## Dependencies (1)

- [@vvo/tzdb](https://npm.io/package/@vvo/tzdb.md) latest

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [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

## Recent versions

- 1.0.1 (latest) — 2024-08-12
- 1.0.0 — 2022-09-05

## README

# is-timezone

[![Build](https://github.com/Aerilym/is-timezone/actions/workflows/build.yml/badge.svg)](https://github.com/Aerilym/is-timezone/actions/workflows/build.yml)
[![npm version](https://badge.fury.io/js/is-timezone.svg)](https://badge.fury.io/js/is-timezone)
[![Known Vulnerabilities](https://snyk.io/test/github/aerilym/is-timezone/badge.svg)](https://snyk.io/test/github/aerilym/is-timezone)

Is this string a valid timezone? Validate timezones before using them in node, dates, or new objects.

## Usage

### Setup

```JavaScript
const isTimezone = require('is-timezone');
```

or

```TypeScript
import isTimezone from 'is-timezone';
```

### Validate a timezone

```JavaScript
const isTimezone = require('is-timezone');

if (isTimezone('Australia/Melbourne')) {
  // Do something
};


```

## Example

A production example of using this transport is available here: [photoprism-helper config.ts](https://github.com/Aerilym/photoprism-helper/tree/master/src/config.ts)

Here is the relevant code, omitting anything not relevant to the transport:

```TypeScript
TBA
```

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