Java获取指定天数后的日期

    /**
     * 指定天数的零点时间
     */
    public static Date getAfterTime(int num) {
        DateTime currentDateTime = new DateTime();
        DateTime dateTime = currentDateTime.withMillisOfDay(0).plusDays(num);
        return dateTime.toDate();
    }

 

posted @ 2022-10-16 16:59  白玉神驹  阅读(98)  评论(0)    收藏  举报