0.0.2 • Published 6 months ago

netzila-timezone v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

netzila-timezone

A simple JavaScript/TypeScript library providing a list of time zones.

Installation

You can install the package using npm:

npm install netzila-timezone

Usage

JavaScript (CommonJS)

  const { timeZone } = require('netzila-timezone');

  // Use timeZone function
  console.log(timeZone());

TypeScript / ES6 Modules

  import { timeZone } from 'netzila-timezone';

  // Use timeZone function
  console.log(timeZone());

API

timeZone(): TimeZoneItem[]

Returns an array of time zone objects, each containing value and name properties.

  • value: The time zone identifier.
  • name: The display name of the time zone.

Example:

  const timeZones = timeZone();
  console.log(timeZones);
  /*
  [
    { value: 'Africa/Abidjan', name: 'Africa/Abidjan' },
    { value: 'Africa/Accra', name: 'Africa/Accra' },
    // ... other time zones
  ]
  */
0.0.2

6 months ago

0.0.1

6 months ago