rem: _f9=arr.shift(); switch(_f9){ 
add: _103=arr.shift(); switch(_103){ 
context: fleegix.date.timezone=new function(){this.zoneAreas={AFRICA:"africa",ANTARCTICA:"antarctica",ASIA:"asia",AUSTRALASIA:"australasia",BACKWARD:"backward",ETCETERA:"etcetera",EUROPE:"europe",NORTHAMERICA:"northamerica",PACIFICNEW:"pacificnew",SOUTHAMERICA:"southamerica",SYSTEMV:"systemv"};var _c8=this;var _c9={"jan":0,"feb":1,"mar":2,"apr":3,"may":4,"jun":5,"jul":6,"aug":7,"sep":8,"oct":9,"nov":10,"dec":11};var _ca={"sun":0,"mon":1,"tue":2,"wed":3,"thu":4,"fri":5,"sat":6};var _cb={"Africa":this.zoneAreas.AFRICA,"Indian":this.zoneAreas.AFRICA,"Antarctica":this.zoneAreas.ANTARCTICA,"Asia":this.zoneAreas.ASIA,"Pacific":this.zoneAreas.AUSTRALASIA,"Australia":this.zoneAreas.AUSTRALASIA,"Etc":this.zoneAreas.ETCETERA,"EST":this.zoneAreas.NORTHAMERICA,"MST":this.zoneAreas.NORTHAMERICA,"HST":this.zoneAreas.NORTHAMERICA,"EST5EDT":this.zoneAreas.NORTHAMERICA,"CST6CDT":this.zoneAreas.NORTHAMERICA,"MST7MDT":this.zoneAreas.NORTHAMERICA,"PST8PDT":this.zoneAreas.NORTHAMERICA,"America":function(){var ret=[];if(!this.loadedZoneAreas[this.zoneAreas.NORTHAMERICA]){ret.push(this.zoneAreas.NORTHAMERICA);}if(!this.loadedZoneAreas[this.zoneAreas.SOUTHAMERICA]){ret.push(this.zoneAreas.SOUTHAMERICA);u;}return ret;},"WET":this.zoneAreas.EUROPE,"CET":this.zoneAreas.EUROPE,"MET":this.zoneAreas.EUROPE,"EET":this.zoneAreas.EUROPE,"Europe":this.zoneAreas.EUROPE,"SystemV":this.zoneAreas.SYSTEMV};var _cd={"Pacific/Honolulu":this.zoneAreas.NORTHAMERICA,"Pacific/Easter":this.zoneAreas.SOUTHAMERICA,"Pacific/Galapagos":this.zoneAreas.SOUTHAMERICA,"America/Danmarkshavn":this.zoneAreas.EUROPE,"America/Scoresbysund":this.zoneAreas.EUROPE,"America/Godthab":this.zoneAreas.EUROPE,"America/Thule":this.zoneAreas.EUROPE,"Indian/Kerguelen":this.zoneAreas.ANTARCTICA,"Indian/Chagos":this.zoneAreas.ASIA,"Indian/Maldives":this.zoneAreas.ASIA,"Indian/Christmas":this.zoneAreas.AUSTRALASIA,"Indian/Cocos":this.zoneAreas.AUSTRALASIA,"Europe/Nicosia":this.zoneAreas.ASIA,"Pacific/Easter":this.zoneAreas.SOUTHAMERICA,"Africa/Ceuta":this.zoneAreas.EUROPE,"Asia/Yekaterinburg":this.zoneAreas.EUROPE,"Asia/Omsk":this.zoneAreas.EUROPE,"Asia/Novosibirsk":this.zoneAreas.EUROPE,"Asia/Krasnoyarsk":this.zoneAreas.EUROPE,"Asia/Irkutsk":this.zoneAreas.EUROPE,"Asia/Yakutsk":this.zoneAreas.EUROPE,"Asia/Vladivostok":this.zoneAreas.EUROPE,"Asia/Sakhalin":this.zoneAreas.EUROPE,"Asia/Magadan":this.zoneAreas.EUROPE,"Asia/Kamchatka":this.zoneAreas.EUROPE,"Asia/Anadyr":this.zoneAreas.EUROPE,"Asia/Istanbul":this.zoneAreas.EUROPE};var _ce={};function parseTimeString(str){var pat=/(\d+)(?::0*(\d*))?(?::0*(\d*))?([wsugz])?$/;var hms=str.match(pat);hms[1]=parseInt(hms[1]);hms[2]=hms[2]?parseInt(hms[2]):0;hms[3]=hms[3]?parseInt(hms[3]):0;return hms;}function getZone(dt,tz){var _d4=tz;var _d5=_c8.zones[_d4];while(typeof (_d5)=="string"){_d4=_d5;_d5=_c8.zones[_d4];if(!_d5){alert("Cannot figure out the timezone "+_d4);}}for(var i=0;i<_d5.length;i++){var z=_d5[i];if(!z[3]){break;}var yea=parseInt(z[3]);var mon=11;var dat=31;if(z[4]){mon=_c9[z[4].substr(0,3).toLowerCase()];dat=parseInt(z[5]);}var t=z[6]?z[6]:"23:59:59";t=parseTimeString(t);var d=Date.UTC(yea,mon,dat,t[1],t[2],t[3]);if(dt.getTime()<d){break;}}if(i==_d5.length){alert("No DST for "+_d4);}else{return _d5[i];}}function getBasicOffset(z){var off=parseTimeString(z[0]);var adj=z[0].indexOf("-")==0?-1:1;off=adj*(((off[1]*60+off[2])*60+off[3])*1000);return -off/60/1000;}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;}function getAdjustedOffset(off,_f0){var _f1=_f0[6];var t=parseTimeString(_f1);var adj=_f1.indexOf("-")==0?-1:1;var ret=(adj*(((t[1]*60+t[2])*60+t[3])*1000));ret=ret/60/1000;ret-=off;ret=-Math.ceil(ret);return ret;}this.defaultZoneArea=this.zoneAreas.NORTHAMERICA;this.zones={};this.rules={};this.parseZones=function(str){var s="";var _f7=str.split("\n");var arr=[];var _f9="";var _fa=null;var _fb=null;for(var i=0;i<_f7.length;i++){l=_f7[i];if(l.match(/^\s/)){l="Zone "+_fa+l;}l=l.split("#")[0];if(l.length>3){arr=l.split(/\s+/);_f9=arr.shift();switch(_f9){case "Zone":_fa=arr.shift();if(!_c8.zones[_fa]){_c8.zones[_fa]=[];}_c8.zones[_fa].push(arr);break;case "Rule":_fb=arr.shift();if(!_c8.rules[_fb]){_c8.rules[_fb]=[];}_c8.rules[_fb].push(arr);break;case "Link":if(_c8.zones[arr[1]]){alert("Error with Link "+arr[1]);}_c8.zones[arr[1]]=arr[0];break;case "Leap":break;default:break;}}}return true;};this.getOffset=function(dt,tz){var _ff=getZone(dt,tz);var off=getBasicOffset(_ff);var rule=getRule(dt,_ff[1]);if(rule){off=getAdjustedOffset(off,rule);}return off;};};
meta: 10428	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10428/e022a81562477ed98b0c5e9980772bddbc8f5488/fleegix.js/buggy/fleegix.js