Sets the date's hours. Setting the hours to a number greater than 23 also increments the day of the month.
var myDate = new Date();
/*from w ww. j a va 2 s . c o m*/
myDate.setHours(3);
console.log(myDate.toString());
The code above generates the following result.