1.0.0 • Published 2 years ago

is-timezone v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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