Socket
Socket
Sign inDemoInstall

current-time

Package Overview
Dependencies
16
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    current-time

Get current date and time in descriptive format


Version published
Weekly downloads
3
decreased by-78.57%
Maintainers
1
Install size
3.93 MB
Created
Weekly downloads
 

Readme

Source

current-time

Build Status

:alarm_clock: Get current date and time in descriptive format

Install

$ npm install --save current-time

Usage

›› 1

const currenTime = require('current-time');

currenTime('Perl').then(data => {
	console.log(data);
	/*
	{
		data: 'The current time in Perl, Saarland, Germany (CEST) is 9pm on Thursday the 15th of September, 2016.'
	}
	/*
});

›› 2

const currenTime = require('current-time');

currenTime('If its 4pm in London what is the time in Boston').then(data => {
	console.log(data);
	/*
	{
		data: 'It is 11am on Thursday the 15th of September, 2016 in Boston, Massachusetts, United States (EDT) when it is 4pm on Thursday the 15th of September, 2016 in London, England, United Kingdom (BST)'
	}
	*/
});

API

currenTime(info)

info

Type: string

kinds of info that can be supplied :

Current time in a city
  • What is the time in New York

  • Time in Belgrade

Time conversions between cities in different timezones
  • What is the time in Kathmandu Nepal when it is 7pm in New York USA

  • Whats the time in Chicago when its 8pm Eastern Time

  • If its 4pm in London what is the time in Boston

Time conversions between cities in different timezones on a particular date
  • What is the time in Sao Paolo when it is 6pm on the 2nd of June in California

  • What time is it in Paris when it is 5-April-2015 in Sydney at 2am

  • When its midday on the 9th of September Pacific Time, whats the time in Miami

Daylight saving information for a city
  • When does daylight saving time begin in Auckland

  • DST time in London

Daylight saving information for a city for a specific year
  • When does daylight saving time begin in New York in 2016

NOTE

›› Data scrapped from naturaldateandtime

License

MIT © Rishi Giri

Keywords

FAQs

Last updated on 15 Sep 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc