Skip to content

lijuSam/Advance-time-zone-convertor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Time Zone Converter

npm version npm downloads GitHub license

A simple npm package for converting time between different time zones.

Installation

Install the package via npm:

npm install time-zone-convertor


// Use the DateTimeConverter module to convert to all time zones
const DateTimeConverter = require('time-zone-convertor');

const dateTime = '2024-03-09 12:00:00';
const fromTimeZone = 'America/New_York';
const toTimeZone = 'UTC';
const format = 'YYYY-MM-DD HH:mm:ss';

const convertedDateTime = DateTimeConverter.convertToAllTimeZones(dateTime, fromTimeZone, toTimeZone, format);
console.log(`Converted time to ${toTimeZone}:`, convertedDateTime);



Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.

About

A npm language for converting time zone into all format including gmt , utc

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published