Date to get minutes and hours - Node.js Date

Node.js examples for Date:Hour

Description

Date to get minutes and hours

Demo Code

Date.prototype.getSimpleMinutes = function getSimpleMinutes() {
  var ss_ofs = this.getDaySimpleSeconds();
  var sm_ofs = Math.floor(ss_ofs/100);
  var sh_ofs = Math.floor(sm_ofs/100);
  
  return sm_ofs-sh_ofs*100;
}

Date.prototype.getSimpleHours = function getSimpleHours() {
  var ss_ofs = this.getDaySimpleSeconds();
  var sm_ofs = Math.floor(ss_ofs/100);
  var sh_ofs = Math.floor(sm_ofs/100);
  
  return sh_ofs;//from  w w  w. ja  va2  s  . c  o m
}

Related Tutorials