From 5acd00fd233757a9c7616b23b195e93e3cdb605a Mon Sep 17 00:00:00 2001
From: chenjiahe <763432473@qq.com>
Date: 星期一, 26 十二月 2022 17:06:22 +0800
Subject: [PATCH] 新增时间算法

---
 src/main/java/com/hx/util/DateUtil.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/hx/util/DateUtil.java b/src/main/java/com/hx/util/DateUtil.java
index 18bc8ff..3618084 100644
--- a/src/main/java/com/hx/util/DateUtil.java
+++ b/src/main/java/com/hx/util/DateUtil.java
@@ -660,6 +660,18 @@
         return sdf.format(calendar.getTime());
     }
 
+    /**杩欏ぉ鐨勫紑濮嬫椂闂�
+     * 鏃ユ湡2000-01-01鍙�2000-01-01 00:00:00
+     */
+    public static Date dayToStartDate(Date date) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        calendar.set(Calendar.HOUR_OF_DAY, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        return calendar.getTime();
+    }
+
     /**杩欏ぉ鐨勬渶鍚庢椂闂�
      * 鏃ユ湡2000-01-01鍙�2000-01-01 23:59:59
      */

--
Gitblit v1.8.0