<html> <head> <title>JavaScript setHours Method</title> </head> <body> <script> var dt = new Date(); dt.setHours( dt.getHours() + 2 ); document.write( dt ); </script> </body> </html>