Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coords-timezone

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coords-timezone

A JavaScript library to calculate timezone information and local time based on latitude and longitude.

  • 6.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Coords-Timezone

Coords-Timezone is a JavaScript library to calculate timezone information and local time based on latitude and longitude.

Installation

You can install the package using npm:

npm install coords-timezone

Example Usage

const timezoneCalculator = require('coords-timezone');

const latitude = 30.0444;
const longitude = 31.2357;
const formatOffset = 'hh:mm';

const info = timezoneCalculator.getTimezoneInfo(latitude, longitude, formatOffset);
console.log(`Timezone: ${info.timezone}, Current Offset: ${info.currentOffset}, Standard Offset: ${info.standardOffset}, DST: ${info.dst}, Abbreviation: ${info.abbreviation}, Local Time: ${info.current}`);

Offset Formats

Here are the available offset formats:

FormatExample
hh:mm+02:00
hh+02
h+2

License

This project is licensed under the ISC License.

Keywords

FAQs

Package last updated on 11 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc