Add a specified amount of time (in units) to date object.
addTime(new Date(2020, 2, 1), 5, TimeUnit.HOURS) // "2020-03-01T13:00:00.000Z"addTime(new Date(2020, 2, 1), 3, TimeUnit.DAYS) // "2020-03-04T08:00:00.000Z"addTime(new Date(2020, 2, 1), 1, TimeUnit.MONTHS) // "2020-04-01T07:00:00.000Z"
JavaScript date object after adding the specified amount of time
JavaScript date object
Number of time units to add
String token representing time unit
Generated using TypeDoc
Add a specified amount of time (in units) to date object.
Example
Returns
JavaScript date object after adding the specified amount of time