To add hours and minutes to a date, use the setHours() and setMinutes() method in JavaScript.
Example
You can try to run the following code to add hours and minutes −
<html> <head> <title>JavaScript Dates</title> </head> <body> <script> var dt = new Date(); document.write("Current Date: "+dt); dt.setHours(dt.getHours() + 2); dt.setMinutes(dt.getMinutes() + 20); document.write("<br>Updated Date: "+dt); </script> </body> </html>