fuliqi
2024-10-17 8546b3d285af4235a0ef615a0c6e89486ae2c806
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);
    }
}