悠然哈哈哈

导航

查询时间不能超过90天

var starStrDay:String=startDate.value.toString();
   var endStrDay:String=endDate.value.toString();
   var starDay:Date = DateFormatter.parseDateString(starStrDay); 
   var endDay:Date = DateFormatter.parseDateString(endStrDay);
   var diff:Number = endDay.getTime() - starDay.getTime(); 
   if(Math.round(diff/86400000)>90){
    Alert.show("查询范围不能超过90天");
    return;
   }

posted on 2013-09-18 18:40  悠然886  阅读(387)  评论(0编辑  收藏  举报