Javascript Date halfHoursUntil(otherTime)

Description

Javascript Date halfHoursUntil(otherTime)

Date.prototype.halfHoursUntil = function(otherTime) {
 var hour = new Date(this);
 var numberOfHalfHours = 0;
 while (hour < otherTime) {
  numberOfHalfHours++;// w ww  . j a v  a 2 s .  c  o m
  hour.addHalfHour();
 }
 return numberOfHalfHours;
};



PreviousNext

Related