From 9134911f3185df2ed3668225a21aa1056abbcbf4 Mon Sep 17 00:00:00 2001
From: fwq <582742538@qq.com>
Date: 星期五, 03 二月 2023 10:54:17 +0800
Subject: [PATCH] 增加文件转换方法

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

diff --git a/src/main/java/com/hx/util/DateUtil.java b/src/main/java/com/hx/util/DateUtil.java
index 5bcedbe..a52169c 100644
--- a/src/main/java/com/hx/util/DateUtil.java
+++ b/src/main/java/com/hx/util/DateUtil.java
@@ -766,4 +766,18 @@
         month.roll(Calendar.DATE, -1);
         return month.getActualMaximum(Calendar.DATE) - Calendar.getInstance().get(Calendar.DAY_OF_MONTH);
     }
+
+    /**鑾峰彇褰撳墠鏃堕棿鎵�鍦ㄥ懆鐨勫懆涓�00:00:00*/
+    public static Date getMonday(Date date) {
+        Calendar calendar = Calendar.getInstance(Locale.CHINA);
+        calendar.setTime(date);
+        //浠ュ懆涓�涓洪鏃�
+        calendar.setFirstDayOfWeek(Calendar.MONDAY);
+        calendar.set(Calendar.HOUR_OF_DAY, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        //鍛ㄤ竴
+        calendar.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
+        return calendar.getTime();
+    }
 }

--
Gitblit v1.8.0