The title is clearer than your question. So I will answer to the title.
First thing first, the relevant references on JavaScript DateTime are here:
1.
JavaScript Dates[
^]
2 .
JavaScript Date Formats[
^]
3.
JavaScript Date Methods[
^]
Do go through them after my explanation and example code shown below.
First, convert any date time components into milliseconds, including the interval;
Second, perform any desired arithmetic calculation using the milliseconds;
Lastly, convert the resulting milliseconds back to the new date time.
Study the example code which is adequately commented:
<!DOCTYPE html>
<html>
<body>
<p id="startDateTime"></p>
<p id="futureDateTime"></p>
<script>
var startDateTime = new Date(2017,0,2,12,30,00,0);
document.getElementById("startDateTime").innerHTML = startDateTime;
var startDateTimeInMilliseconds = startDateTime.getTime();
var hoursInMilliseconds = 12*60*60*1000;
var minutesInMilliseconds = 30*60*1000;
var futureInMilliseconds = startDateTimeInMilliseconds + hoursInMilliseconds + minutesInMilliseconds;
var futureDateTime = new Date(futureInMilliseconds);
document.getElementById("futureDateTime").innerHTML = futureDateTime;
</script>
</body>
</html>
A demo version at
JSFiddle[
^]
Cross-referencing with the above links to better understand my code.