world-clockify
Features
- Convert date/time between different timezones.
- Get the current time in any timezone.
- Calculate the time difference (in hours) between two timezones.
Installation
You can install the package via npm or yarn.
npm install world-clockify
yarn add world-clockify
Usage
After installation, you can use the library as follows:
import { convertTimeZone, getCurrentTimeInZone, getTimeDifference } from 'world-clockify';
const convertedTime = convertTimeZone('2024-01-01T12:00:00', 'America/New_York', 'Europe/London');
console.log(convertedTime);
const currentTime = getCurrentTimeInZone('America/New_York');
console.log(currentTime);
const timeDifference = getTimeDifference('America/New_York', 'Europe/London');
console.log(timeDifference);