Skip to content

Latest commit

 

History

History
75 lines (57 loc) · 1.77 KB

File metadata and controls

75 lines (57 loc) · 1.77 KB

timelify

NPM Version NPM Downloads Node.js Version

Get the current time in any timezone.

Installation

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm install timelify

API

var timelify = require("timelify");

timelify.getCurrentTime()

Get the current time in any timezone

Example

var timelify = require("timelify");

timelify.getCurrentTime();

// [
//   {
//     timezone: 'America/New_York',
//     currentTime: 'Monday, January 2, 2023 8:13 AM'
//   },
//   {
//     timezone: 'Asia/Tokyo',
//     currentTime: 'Monday, January 2, 2023 10:13 PM'
//   },
//   {
//     timezone: 'Europe/Paris',
//     currentTime: 'Monday, January 2, 2023 2:13 PM'
//   },
//   {
//     timezone: 'Australia/Sydney',
//     currentTime: 'Tuesday, January 3, 2023 12:13 AM'
//   },
//   {
//     timezone: 'Africa/Johannesburg',
//     currentTime: 'Monday, January 2, 2023 3:13 PM'
//   }
// ]

License

MIT