rem: var _eb=d.getUTCDay(); var _ec=(day>_eb)?(day-_eb-7):(day-_eb); d.setUTCDate(d.getUTCDate()+_ec); 
add: var _f5=d.getUTCDay(); var _f6=(day>_f5)?(day-_f5-7):(day-_f5); d.setUTCDate(d.getUTCDate()+_f6); 
context: function getRule(dt,str){var _e2=null;var _e3=dt.getUTCFullYear();var _e4=_c8.rules[str];var _e5=[];if(!_e4){return null;}for(var i=0;i<_e4.length;i++){r=_e4[i];if((r[1]<(_e3-1))||(r[0]<(_e3-1)&&r[1]=="only")||(r[0]>_e3)){continue;}var mon=_c9[r[3].substr(0,3).toLowerCase()];var day=r[4];if(isNaN(day)){if(day.substr(0,4)=="last"){var day=_ca[day.substr(4,3).toLowerCase()];var t=parseTimeString(r[5]);var d=new Date(Date.UTC(dt.getUTCFullYear(),mon+1,1,t[1]-24,t[2],t[3]));var _eb=d.getUTCDay();var _ec=(day>_eb)?(day-_eb-7):(day-_eb);d.setUTCDate(d.getUTCDate()+_ec);if(dt<d){if(r[0]<_e3){d.setUTCFullYear(d.getUTCFullYear()-1);if(dt>=d){_e5.push({"rule":r,"date":d});}}}else{_e5.push({"rule":r,"date":d});}}else{day=_ca[day.substr(0,3).toLowerCase()];if(day!="undefined"){if(r[4].substr(3,2)==">="){var t=parseTimeString(r[5]);var d=new Date(Date.UTC(dt.getUTCFullYear(),mon,parseInt(r[4].substr(5)),t[1],t[2],t[3]));var _eb=d.getUTCDay();var _ec=(day<_eb)?(day-_eb+7):(day-_eb);d.setUTCDate(d.getUTCDate()+_ec);if(dt<d){if(r[0]<_e3){d.setUTCFullYear(d.getUTCFullYear()-1);if(dt>=d){_e5.push({"rule":r,"date":d});}}}else{_e5.push({"rule":r,"date":d});}}else{if(day.substr(3,2)=="<="){var t=parseTimeString(r[5]);var d=new Date(Date.UTC(dt.getUTCFullYear(),mon,parseInt(r[4].substr(5)),t[1],t[2],t[3]));var _eb=d.getUTCDay();var _ec=(day>_eb)?(day-_eb-7):(day-_eb);d.setUTCDate(d.getUTCDate()+_ec);if(dt<d){if(r[0]<_e3){d.setUTCFullYear(d.getUTCFullYear()-1);if(dt>=d){_e5.push({"rule":r,"date":d});}}}else{_e5.push({"rule":r,"date":d});}}}}}}else{var t=parseTimeString(r[5]);var d=new Date(Date.UTC(dt.getUTCFullYear(),mon,day,t[1],t[2],t[3]));d.setUTCHours(d.getUTCHours()-24*((7-day+d.getUTCDay())%7));if(dt<d){continue;}else{_e5.push({"rule":r,"date":d});}}}f=function(a,b){return (a.date.getTime()>=b.date.getTime())?1:-1;};_e5.sort(f);_e2=_e5.pop().rule;return _e2;}
meta: 10428	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10428/e022a81562477ed98b0c5e9980772bddbc8f5488/fleegix.js/buggy/fleegix.js