//>>built define("dojox/date/islamic/Date",["dojo/_base/kernel","dojo/_base/declare","dojo/date"],function(_1,_2,dd){ _1.getObject("date.buddhist.Date",true,dojox); _1.experimental("dojox.date.buddhist.Date"); _1.declare("dojox.date.islamic.Date",null,{_date:0,_month:0,_year:0,_hours:0,_minutes:0,_seconds:0,_milliseconds:0,_day:0,_GREGORIAN_EPOCH:1721425.5,_ISLAMIC_EPOCH:1948439.5,constructor:function(){ var _3=arguments.length; if(!_3){ this.fromGregorian(new Date()); }else{ if(_3==1){ var _4=arguments[0]; if(typeof _4=="number"){ _4=new Date(_4); } if(_4 instanceof Date){ this.fromGregorian(_4); }else{ if(_4==""){ this._date=new Date(""); }else{ this._year=_4._year; this._month=_4._month; this._date=_4._date; this._hours=_4._hours; this._minutes=_4._minutes; this._seconds=_4._seconds; this._milliseconds=_4._milliseconds; } } }else{ if(_3>=3){ this._year+=arguments[0]; this._month+=arguments[1]; this._date+=arguments[2]; this._hours+=arguments[3]||0; this._minutes+=arguments[4]||0; this._seconds+=arguments[5]||0; this._milliseconds+=arguments[6]||0; } } } },getDate:function(){ return this._date; },getMonth:function(){ return this._month; },getFullYear:function(){ return this._year; },getDay:function(){ return this.toGregorian().getDay(); },getHours:function(){ return this._hours; },getMinutes:function(){ return this._minutes; },getSeconds:function(){ return this._seconds; },getMilliseconds:function(){ return this._milliseconds; },setDate:function(_5){ _5=parseInt(_5); if(_5>0&&_5<=this.getDaysInIslamicMonth(this._month,this._year)){ this._date=_5; }else{ var _6; if(_5>0){ for(_6=this.getDaysInIslamicMonth(this._month,this._year);_5>_6;_5-=_6,_6=this.getDaysInIslamicMonth(this._month,this._year)){ this._month++; if(this._month>=12){ this._year++; this._month-=12; } } this._date=_5; }else{ for(_6=this.getDaysInIslamicMonth((this._month-1)>=0?(this._month-1):11,((this._month-1)>=0)?this._year:this._year-1);_5<=0;_6=this.getDaysInIslamicMonth((this._month-1)>=0?(this._month-1):11,((this._month-1)>=0)?this._year:this._year-1)){ this._month--; if(this._month<0){ this._year--; this._month+=12; } _5+=_6; } this._date=_5; } } return this; },setFullYear:function(_7){ this._year=+_7; },setMonth:function(_8){ this._year+=Math.floor(_8/12); if(_8>0){ this._month=Math.floor(_8%12); }else{ this._month=Math.floor(((_8%12)+12)%12); } },setHours:function(){ var _9=arguments.length; var _a=0; if(_9>=1){ _a=parseInt(arguments[0]); } if(_9>=2){ this._minutes=parseInt(arguments[1]); } if(_9>=3){ this._seconds=parseInt(arguments[2]); } if(_9==4){ this._milliseconds=parseInt(arguments[3]); } while(_a>=24){ this._date++; var _b=this.getDaysInIslamicMonth(this._month,this._year); if(this._date>_b){ this._month++; if(this._month>=12){ this._year++; this._month-=12; } this._date-=_b; } _a-=24; } this._hours=_a; },_addMinutes:function(_c){ _c+=this._minutes; this.setMinutes(_c); this.setHours(this._hours+parseInt(_c/60)); return this; },_addSeconds:function(_d){ _d+=this._seconds; this.setSeconds(_d); this._addMinutes(parseInt(_d/60)); return this; },_addMilliseconds:function(_e){ _e+=this._milliseconds; this.setMilliseconds(_e); this._addSeconds(parseInt(_e/1000)); return this; },setMinutes:function(_f){ this._minutes=_f%60; return this; },setSeconds:function(_10){ this._seconds=_10%60; return this; },setMilliseconds:function(_11){ this._milliseconds=_11%1000; return this; },toString:function(){ var x=new Date(); x.setHours(this._hours); x.setMinutes(this._minutes); x.setSeconds(this._seconds); x.setMilliseconds(this._milliseconds); return this._month+" "+this._date+" "+this._year+" "+x.toTimeString(); },toGregorian:function(){ var _12=this._year; var _13=this._month; var _14=this._date; var _15=_14+Math.ceil(29.5*_13)+(_12-1)*354+Math.floor((3+(11*_12))/30)+this._ISLAMIC_EPOCH-1; var wjd=Math.floor(_15-0.5)+0.5,_16=wjd-this._GREGORIAN_EPOCH,_17=Math.floor(_16/146097),dqc=this._mod(_16,146097),_18=Math.floor(dqc/36524),_19=this._mod(dqc,36524),_1a=Math.floor(_19/1461),_1b=this._mod(_19,1461),_1c=Math.floor(_1b/365),_1d=(_17*400)+(_18*100)+(_1a*4)+_1c; if(!(_18==4||_1c==4)){ _1d++; } var _1e=this._GREGORIAN_EPOCH+(365*(_1d-1))+Math.floor((_1d-1)/4)-(Math.floor((_1d-1)/100))+Math.floor((_1d-1)/400); var _1f=wjd-_1e; var tjd=(this._GREGORIAN_EPOCH-1)+(365*(_1d-1))+Math.floor((_1d-1)/4)-(Math.floor((_1d-1)/100))+Math.floor((_1d-1)/400)+Math.floor((739/12)+((dd.isLeapYear(new Date(_1d,3,1))?-1:-2))+1); var _20=((wjd