Calendar c = Calendar.getInstance();
Date date=null;
try {
date = new SimpleDateFormat("yy-MM-dd").parse("2019-1-13");
} catch (Exception e) {
e.printStackTrace();
}
c.setTime(date);
int day=c.get(Calendar.DATE);
c.set(Calendar.DATE,day+2);
logger.info(date+"=============================" + c.getTime() + "+++++++++++++++++++++");
pd2.put("StartDay" ,date);
pd2.put("LastDay",c.getTime());
此时date 和 c.getTime是当前时间和两天后的时间的 时间戳