Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.abbrDayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.abbrMonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Date.firstDayOfWeek=1;Date.format="dd/mm/yyyy";Date.fullYearStart="20";(function(){function b(c,d){if(!Date.prototype[c]){Date.prototype[c]=d}}b("isLeapYear",function(){var c=this.getFullYear();return(c%4==0&&c%100!=0)||c%400==0});b("isWeekend",function(){return this.getDay()==0||this.getDay()==6});b("isWeekDay",function(){return !this.isWeekend()});b("getDaysInMonth",function(){return[31,(this.isLeapYear()?29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()]});b("getDayName",function(c){return c?Date.abbrDayNames[this.getDay()]:Date.dayNames[this.getDay()]});b("getMonthName",function(c){return c?Date.abbrMonthNames[this.getMonth()]:Date.monthNames[this.getMonth()]});b("getDayOfYear",function(){var c=new Date("1/1/"+this.getFullYear());return Math.floor((this.getTime()-c.getTime())/86400000)});b("getWeekOfYear",function(){return Math.ceil(this.getDayOfYear()/7)});b("setDayOfYear",function(c){this.setMonth(0);this.setDate(c);return this});b("addYears",function(c){this.setFullYear(this.getFullYear()+c);return this});b("addMonths",function(d){var c=this.getDate();this.setMonth(this.getMonth()+d);if(c>this.getDate()){this.addDays(-this.getDate())}return this});b("addDays",function(c){this.setTime(this.getTime()+(c*86400000));return this});b("addHours",function(c){this.setHours(this.getHours()+c);return this});b("addMinutes",function(c){this.setMinutes(this.getMinutes()+c);return this});b("addSeconds",function(c){this.setSeconds(this.getSeconds()+c);return this});b("zeroTime",function(){this.setMilliseconds(0);this.setSeconds(0);this.setMinutes(0);this.setHours(0);return this});b("asString",function(d){var c=d||Date.format;return c.split("yyyy").join(this.getFullYear()).split("yy").join((this.getFullYear()+"").substring(2)).split("mmmm").join(this.getMonthName(false)).split("mmm").join(this.getMonthName(true)).split("mm").join(a(this.getMonth()+1)).split("dd").join(a(this.getDate()))});Date.fromString=function(n){var j=Date.format;var m=new Date("01/01/1977");var k=0;var c=j.indexOf("mmmm");if(c>-1){for(var g=0;g<Date.monthNames.length;g++){var e=n.substr(c,Date.monthNames[g].length);if(Date.monthNames[g]==e){k=Date.monthNames[g].length-4;break}}m.setMonth(g)}else{c=j.indexOf("mmm");if(c>-1){var e=n.substr(c,3);for(var g=0;g<Date.abbrMonthNames.length;g++){if(Date.abbrMonthNames[g]==e){break}}m.setMonth(g)}else{m.setMonth(Number(n.substr(j.indexOf("mm"),2))-1)}}var l=j.indexOf("yyyy");if(l>-1){if(c<l){l+=k}m.setFullYear(Number(n.substr(l,4)))}else{if(c<l){l+=k}m.setFullYear(Number(Date.fullYearStart+n.substr(j.indexOf("yy"),2)))}var h=j.indexOf("dd");if(c<h){h+=k}m.setDate(Number(n.substr(h,2)));if(isNaN(m.getTime())){return false}return m};var a=function(c){var d="0"+c;return d.substring(d.length-2)}})();