public void countByDate(Timestamp currentMonth){
for(int i =0;i<10;i++){
if(i==0){
Timestamp nextMonth=new Timestamp(currentMonth.getTime());
nextMonth.setHours(23);
nextMonth.setMinutes(59);
nextMonth.setSeconds(59);
}else{
Timestamp ddd=new Timestamp(currentMonth.getTime());
currentMonth.setDate(currentMonth.getDate()-1);
ddd.setDate(currentMonth.getDate());
ddd.setHours(23);
ddd.setMinutes(59);
ddd.setSeconds(59);
}
}
JAVA循环输出近10天的日期
最新推荐文章于 2024-07-11 19:48:22 发布