Answers for "javascript get date hour"

3

javascript make new date from hour

// Like Fri, 26 Sep 2014 18:30:00 GMT
var today = new Date();

var myToday = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 0, 0, 0);
Posted by: Guest on June-14-2020
1

javascript get 1 hour from now

Date.prototype.addHours = function(h) {
  this.setTime(this.getTime() + (h*60*60*1000));
  return this;
}
Posted by: Guest on February-27-2020
0

js date get hours

const birthday = new Date('March 13, 08 04:20');

console.log(birthday.getHours());
// expected output: 4
Posted by: Guest on November-27-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language