Javascript Date subtract(b)

Description

Javascript Date subtract(b)


 Date.prototype.subtract = function(b) {
 var delta = this.getTime()-b.getTime()
 return new Date(0,0,0,delta/1000/60/60,(delta/1000/60)%60,(delta/1000)%60)
}



PreviousNext

Related