//得到那一天之前
public Date getNextDay(Date date, int day) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DAY_OF_MONTH, day);
date = calendar.getTime();
return date;
}
//得到那一天之前
public Date getNextMONTH(Date date, int day) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.MONTH, day);
date = calendar.getTime();
return date;
}
java得到那一天之前
最新推荐文章于 2022-08-29 09:58:56 发布