Answers for "addition of time in javascript"

0

addition of time in javascript

var currentDateObj = new Date();
var numberOfMlSeconds = currentDateObj.getTime();
var addMlSeconds = 60 * 60 * 1000;
var newDateObj = new Date(numberOfMlSeconds + addMlSeconds);
RESULTS
currentDateObj: Sat Jul 24 2021 00:19:27 GMT-0300 (Atlantic Daylight Time)
newDateObj: Sat Jul 24 2021 01:19:27 GMT-0300 (Atlantic Daylight Time)
Posted by: Guest on February-27-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language