私有函数calcweektotal(显示日期:日期):数组{
显示日期= dateformatter.parsedatestring(2013-04-01 );
这个月得到1个好日期
无功onedate:日期=新的日期(showdate.fullyear,showdate.month,1);
这个月的第一周/星期一
无功oneweekdate:int = 7 onedate.day + 2;
这个月几天
无功totalday:int =新的日期(showdate.fullyear,showdate.month戴特,0);
Var(totalweek:int = totalday - oneweekdate + 1)% 7 = = 0
(totalday - oneweekdate + 1)/ 7(totalday - oneweekdate + 1)/ 7 + 1;
微量(totalweek);
本月头几周的当前日期
无功currentweek:int = new Int((showdate.date - oneweekdate) / 7)+ 1;
如果(currentweek = = 0){
上周/月
}

申明arr数组=新的数组();
ARR { 0 } = totalweek;
ARR { 1 } = currentweek;
报酬;
}