how to use hour in javascript code example
Example 1: javascript get midnight tonight
var d = new Date();
d.setHours(24,0,0,0); // next midnight
Example 2: jquery get 2 hours frmo now
<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>