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

1.1.3 • Public • Published

Usage

 const timezone = require('isdcode-country-timezone');

getCountries()

This function will return the array of all the countries with ISD/dial code and Time zone.

Output

[
    {
       "dialcode" :  "+263",
        "country": "Zimbabwe",
       "timezone" :  "+2"
    },
    {
        "dialcode" : "+91",
        "country": "India",
        "timezone" :"+5.5"
    },
  ...
]

getTimezone(<dial_code>)

This function will return the timezone of the given ISD / dial code.

Example

To get the list of all the states of INDIA, the function call will look like:

let timezone = getTimezone('+91');
 
console.log(timezone)

Output

'India'

Package Sidebar

Install

npm i isdcode-country-timezone

Weekly Downloads

1

Version

1.1.3

License

MIT

Unpacked Size

9.85 kB

Total Files

10

Last publish

Collaborators

  • praveencs