is-timezone
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

is-timezone

Build npm version Known Vulnerabilities

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

Usage

Setup

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

or

import isTimezone from 'is-timezone';

Validate a timezone

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

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

TBA

Package Sidebar

Install

npm i is-timezone

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

7.58 kB

Total Files

10

Last publish

Collaborators

  • aerilym