javascript date set hours and minutes code example
Example 1: javascript make new date from hour
var today = new Date();
var myToday = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 0, 0, 0);
Example 2: date add hours javascript
Date.prototype.addHours = function(h) {
this.setTime(this.getTime() + (h*60*60*1000));
return this;
}
Example 3: new Date() get speicifc hours min sec
new Date().getDate()
new Date().getDay()
new Date().getFullYear()
new Date().getHours()
new Date().getMilliseconds()
new Date().getMinutes()
new Date().getMonth()
new Date().getSeconds()
new Date().getTime()