From b0a34952a61975657bd3a2386fe38047c4e03723 Mon Sep 17 00:00:00 2001
From: zhouxiantao <1026371446@qq.com>
Date: Fri, 27 Sep 2024 09:24:56 +0800
Subject: [PATCH] 小程序催办
---
dyh-service/dyh-base/src/main/java/cn/huge/base/common/utils/DateUtils.java | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/dyh-service/dyh-base/src/main/java/cn/huge/base/common/utils/DateUtils.java b/dyh-service/dyh-base/src/main/java/cn/huge/base/common/utils/DateUtils.java
index 6bd3cb5..0df7ea2 100644
--- a/dyh-service/dyh-base/src/main/java/cn/huge/base/common/utils/DateUtils.java
+++ b/dyh-service/dyh-base/src/main/java/cn/huge/base/common/utils/DateUtils.java
@@ -174,7 +174,7 @@
* 获取当前时间
* @return Date
*/
- public static Date getMowDate(){
+ public static Date getNowDate(){
return new Date();
}
@@ -971,6 +971,19 @@
}
return year+"年"+month+"月"+day+"日";
}
+
+ /**
+ * 获取两个时间的小时差
+ * */
+ public static Integer getDifferHour(Date time1,Date time2){
+ if(ObjectUtils.isNotEmpty(time1) && ObjectUtils.isNotEmpty(time2)){
+ long housrs = 1000 * 60 * 60;
+ long differ = time1.getTime() - time2.getTime();
+ long housr = differ / housrs;
+ return Integer.valueOf(String.valueOf(housr));
+ }
+ return 0;
+ }
}
/**
* -------------------_ooOoo_-------------------
--
Gitblit v1.8.0