Java循环日期

//循环日期
Calendar ca = Calendar.getInstance();
Date curDate = startDate;
while(curDate.compareTo(endDate)<=0){
      ca.setTime(curDate);
      //业务处理...
      ca.add(ca.DATE, 1);
      curDate = ca.getTime();
}
posted @ 2014-02-17 11:14  竹 影 清 风  阅读(4586)  评论(0编辑  收藏  举报