addMilliseconds()function
addMilliseconds(change: number, target?: PossibleDate, caller: AnyCaller = addMilliseconds): Date
| Param | Type | |
|---|---|---|
change | number | The number of milliseconds to add (negative numbers subtract). required |
target | PossibleDate | Any value that can be converted to a date (defaults to "now"). |
caller | AnyCaller | Function to attribute a thrown error to (defaults to addMilliseconds itself). Defaults to addMilliseconds |
| Return | |
|---|---|
Date | A new Date instance offset by change milliseconds. |
| Throws | |
|---|---|
RequiredError | If target couldn't be converted to a valid date. |
Return a new date that increases or decreases the milliseconds based on an input date.
Examples
addMilliseconds(500, "2003-09-12T00:00:00") // Date instance for 2003-09-12T00:00:00.500