Answers for "get hour and minute from date javascript"

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
2

javascript get hour from date

var myDate = new Date(2019, 11, 24, 10, 33);
var hour = myDate.getHours();
Posted by: Guest on September-22-2020
0

how to show only time in hours and minutes only in javascript

function prettyDate2(time) {
  var date = new Date(parseInt(time));
  return date.toLocaleTimeString(navigator.language, {
    hour: '2-digit',
    minute:'2-digit'
  });
}
Posted by: Guest on July-24-2020

Code answers related to "get hour and minute from date javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language