JAVA实现指定日期加几天

 /**
     * 日期增加一天
     * @param today 日期str
     * @return 加上几天后的日期
     */
    private String addOneday(String today, int i) {
        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
        try {
            Date d = new Date(f.parse(today).getTime() + 24 * 3600 * 1000 * i);
            return f.format(d);
        } catch (Exception ex) {
            return today;
        }
    }

原文地址:https://www.cnblogs.com/peijyStudy/p/12845393.html