rem:  var firstDayOfYear = new Date(dateObject.getFullYear(), 0, 1); var day = firstDayOfYear.getDay(); firstDayOfYear.setDate(firstDayOfYear.getDate() - day + firstDay - (day > firstDay ? 7 : 0)); 
add: var firstDayOfYear = new Date(dateObject.getFullYear(), 0, 1).getDay(); var adj = (firstDayOfYear - firstDayOfWeek + 7) % 7; var week = Math.floor((dojo.date.locale._getDayOfYear(dateObject) + adj - 1) / 7); 
context: dojo.date.locale._getWeekOfYear = function(/*Date*/dateObject, /*Number*/firstDay){	if(arguments.length == 1){ firstDay = 0; } // Sunday	// work out the first day of the year corresponding to the week	var firstDayOfYear = new Date(dateObject.getFullYear(), 0, 1);	var day = firstDayOfYear.getDay();	firstDayOfYear.setDate(firstDayOfYear.getDate() -			day + firstDay - (day > firstDay ? 7 : 0));	return Math.floor((dateObject.getTime() -		firstDayOfYear.getTime()) / (7*24*60*60*1000)); // Number}
meta: 4497	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4497/510ed24ceb572a2d11dc4e3a718b9f829b7965f5/locale.js/clean/date/locale.js