Javascript Date toReadableTime()

Description

Javascript Date toReadableTime()

Date.prototype.toReadableTime = function() {
 if(this.getHours()>0) {
  return this.getHours()+"h "+this.getMinutes()+" min"
 } else {/*from  w  ww.j a  va  2  s .  c  o  m*/
  return this.getMinutes()+" min"
 }
}



PreviousNext

Related