luohairen
2024-11-14 247cb86585a1d1894596ed18a6c93efecb992946
src/main/java/com/ycl/jxkg/utils/DateTimeUtil.java
@@ -153,4 +153,26 @@
        }
        return list;
    }
    /**
     * 计算两个时间之间的毫秒
     *
     * @param bigDate 大日期
     * @param smallDate 小日期
     * @return
     */
    public static Long getTwoTimeDiffMS(Date bigDate, Date smallDate) {
        return bigDate.getTime() - smallDate.getTime();
    }
    /**
     * 计算两个时间之间的天数
     *
     * @param bigDate 大日期
     * @param smallDate 小日期
     * @return
     */
    public static Long getTwoTimeDiffDay(Date bigDate, Date smallDate) {
        return DateTimeUtil.getTwoTimeDiffMS(bigDate, smallDate) / (24 * 60 * 60 * 1000);
    }
}