//计算采购日期
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
c.add(Calendar.DAY_OF_MONTH, Integer.parseInt(toPurchaseDays));//采购周期
String purChaseDate = sf.format(c.getTime());//采购时间
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Date date = null;
try {
date = format.parse(purChaseDate);
} catch (ParseException e2) {
e2.printStackTrace();
}
时间: 2024-10-23 08:08:59