chenjiahe
2021-10-21 8aece88375ec5d60b21f878ec921abaf9d0da54c
src/main/java/com/hx/util/DateUtil.java
@@ -305,6 +305,19 @@
        return c.getTime();
    }
    /**时间上月数叠加
     * @Author: ChenJiaHe
     * @param dateTime 时间
     * @param dayNum 天数
     * @return
     */
    public static Date addMonth(Date dateTime,int dayNum){
        Calendar c = Calendar.getInstance();
        c.setTime(dateTime);
        c.add(Calendar.MONTH, dayNum);
        return c.getTime();
    }
    /**时间上年数叠加
     * @Author: ChenJiaHe
     * @param dateTime 时间