Javascript Date getWeekOld()

Description

Javascript Date getWeekOld()


Date.prototype.getWeekOld = function() {
 var onejan = new Date(this.getFullYear(),0,1);
 return Math.ceil((((this - onejan) / 86400000) + onejan.getDay()+1)/7);
}



PreviousNext

Related