mitao
2024-12-30 3115d589ca3faaecda604e2a66fe193a93ba9cbc
medicalWaste-common/src/main/java/com/sinata/common/utils/DateUtils.java
@@ -175,6 +175,21 @@
    }
    /**
     * 计算小时差
     *
     * @param endDate
     * @param startTime
     * @return
     */
    public static long timeDistanceHour(Date endDate, Date startTime) {
        long nd = 1000 * 24 * 60 * 60;
        long nh = 1000 * 60 * 60;
        long diff = endDate.getTime() - startTime.getTime();
        long hour = diff % nd / nh;
        return hour;
    }
    /**
     * 增加 LocalDateTime ==> Date
     */
    public static Date toDate(LocalDateTime temporalAccessor)