JAVA------21.String转时间,并向前推进一天

//年月日转时间
DateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
Date payTime = format1.parse(getTime);
Calendar c1 = Calendar.getInstance();
c1.setTime(payTime);
int paDay = c1.get(Calendar.DATE);
c1.set(Calendar.DATE, paDay+1);
String netDay = new SimpleDateFormat("yyyy-MM-dd").format(c1.getTime());

原文地址:https://www.cnblogs.com/coriander/p/7027275.html