JUI.Date={isLeapYear:function(a){return !!((a&3)==0&&(a%100||(a%400==0&&a)))},isDateStr:function(a){return !!this._parseDateStrToNum(a)},getMonthDaysArr:function(a){var b=[31,28,31,30,31,30,31,31,30,31,30,31];b[1]=this.isLeapYear(a)?29:28;return b},getEndDate:function(a,b){var c=this.getMonthDaysArr(a);return c[b-1]},parse:function(a){return new Date(this._parseDateStrToNum(a))},_parseDateStrToNum:function(a){return Date.parse(a.replace(/-/g,"/"))},format:function(b,c){var d={"M+":b.getMonth()+1,"d+":b.getDate(),"h+":b.getHours(),"m+":b.getMinutes(),"s+":b.getSeconds(),"q+":Math.floor((b.getMonth()+3)/3),S:b.getMilliseconds()};if(/(y+)/.test(c)){c=c.replace(RegExp.$1,(b.getFullYear()+"").substring(4-RegExp.$1.length))}for(var a in d){if(new RegExp("("+a+")").test(c)){c=c.replace(RegExp.$1,(RegExp.$1.length==1)?(d[a]):(("00"+d[a]).substring((""+d[a]).length)))}}return c}};