Date plandate = planDate.toDate();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance();
cal.setTime(plandate);
// 取得三个月后时间
cal.add(Calendar.MONTH, 3);
planDate = UFDate.getDate(df.format(cal.getTime()));
本文介绍如何使用Java进行日期的加减操作,包括将当前日期加上三个月的具体实现方式。
Date plandate = planDate.toDate();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance();
cal.setTime(plandate);
// 取得三个月后时间
cal.add(Calendar.MONTH, 3);
planDate = UFDate.getDate(df.format(cal.getTime()));
3191
3548
364
1089
8402
2083

被折叠的 条评论
为什么被折叠?
