How do I get the current weeknumber of the year, like PHP\'s date(\'W\')?
date(\'W\')
It should be the ISO-8601 week number of year, weeks starting
Accordily http://javascript.about.com/library/blweekyear.htm
Date.prototype.getWeek = function() { var onejan = new Date(this.getFullYear(),0,1); var millisecsInDay = 86400000; return Math.ceil((((this - onejan) /millisecsInDay) + onejan.getDay()+1)/7); };