Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript add hours

function addHours(hours, date = new Date()) {
  let ms = hours * 60 * 60 * 1000;
  date.setTime(date.getTime() + ms);
  return date;
}
Source by bobbyhadz.com #
 
PREVIOUS NEXT
Tagged: #javascript #add #hours
ADD COMMENT
Topic
Name
3+6 =