Socket
Socket
Sign inDemoInstall

add-time

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

add-time

Add time to a date.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

add-time Travis CI Build Status

Add time to a date.

NPM Badge

Install

npm install add-time

Usage

const addTime = require("add-time");

addTime(date, {
	seconds: 10,
	minutes: 60
})
//=> 2020-08-17T00:28:11.523Z

addTime.now({
	days: 12,
	months: 8
});
//=> 2021-04-28T23:26:53.801Z

API

addTime(date, options?)

Add time to a date.

addTime.now(options?)

Add time to the current date.

date

Type: Date | number | string

The date to add to.

options

Type: object

milliseconds

Type: integer
Default: 0

The amount of milliseconds to add.

seconds

Type: integer
Default: 0

The amount of seconds to add.

minutes

Type: integer
Default: 0

The amount of minutes to add.

hours

Type: integer
Default: 0

The amount of hours to add.

days

Type: integer
Default: 0

The amount of days to add.

weeks

Type: integer
Default: 0

The amount of weeks to add.

fortnights

Type: integer
Default: 0

The amount of fortnights to add.

years

Type: integer
Default: 0

The amount of years to add.

decades

Type: integer
Default: 0

The amount of decades to add.

centuries

Type: integer
Default: 0

The amount of centuries to add.

millennia

Type: integer
Default: 0

The amount of millennia to add.

Keywords

FAQs

Package last updated on 16 Aug 2020

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