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

2.0.0 • Public • Published

country-by-timezone

Get country data by timezone string.

Timezone data used here is from IANA Database.

CI npm

Install

npm i country-by-timezone

Usage

import getCountryByTimezone from "country-by-timezone";

const country = getCountryByTimezone("Asia/Kolkata");

console.log(country);
/*
{
  countryCode: 'IN',
  countryName: 'India',
  timeZone: 'Asia/Kolkata',
  coordinates: [ '20.0000', '77.0000' ]
}
*/

API

getCountryByTimezone(timezone)

Get country information by timezone string.

1. timezone

type: string | string[]
A timezone string or string[] ex: Asia/Kolkata

Dependencies (1)

Dev Dependencies (1)

Package Sidebar

Install

npm i country-by-timezone

Weekly Downloads

7

Version

2.0.0

License

MIT

Unpacked Size

52.2 kB

Total Files

6

Last publish

Collaborators

  • rocktimsaikia