Add time to a date.
npm install add-timeconst 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.801ZAdd time to a date.
Add time to the current date.
Type: Date | number | string
The date to add to.
Type: object
Type: integer
Default: 0
The amount of milliseconds to add.
Type: integer
Default: 0
The amount of seconds to add.
Type: integer
Default: 0
The amount of minutes to add.
Type: integer
Default: 0
The amount of hours to add.
Type: integer
Default: 0
The amount of days to add.
Type: integer
Default: 0
The amount of weeks to add.
Type: integer
Default: 0
The amount of fortnights to add.
Type: integer
Default: 0
The amount of years to add.
Type: integer
Default: 0
The amount of decades to add.
Type: integer
Default: 0
The amount of centuries to add.
Type: integer
Default: 0
The amount of millennia to add.
