@RequestMapping("/show/show001Cover.do")
public void show001Cover(Integer year,Integer month,Boolean isCreate,String createDateStr,Model model){
if(year!=null&&month!=null){
Calendar calendar = Calendar.getInstance();
calendar.set(year, month-1, 1);
int day = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
model.addAttribute("year",year);
model.addAttribute("month",month);
model.addAttribute("day",day);
}
model.addAttribute("createDateStr",createDateStr);
model.addAttribute("isCreate",isCreate);
}
Calendar:获取每年每月的最后一天
最新推荐文章于 2024-07-07 03:48:07 发布