From 8d8b9e4254231ff4dc8fc32c29608aeec47232d5 Mon Sep 17 00:00:00 2001
From: fwq <582742538@qq.com>
Date: 星期一, 26 十二月 2022 17:38:39 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

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

diff --git a/src/main/java/com/hx/util/DateUtil.java b/src/main/java/com/hx/util/DateUtil.java
index 3618084..64e037f 100644
--- a/src/main/java/com/hx/util/DateUtil.java
+++ b/src/main/java/com/hx/util/DateUtil.java
@@ -755,4 +755,15 @@
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA);
         return sdf.format(calendar.getTime());
     }
+
+    /**
+     * 鑾峰彇鏃堕棿褰撴湀鍓╀綑澶╂暟
+     * */
+    public static Integer getMonthSurplus(Date date) {
+        Calendar month = Calendar.getInstance();
+        month.setTime(new Date());
+        month.set(Calendar.DATE, 1);
+        month.roll(Calendar.DATE, -1);
+        return month.getActualMaximum(Calendar.DATE) - Calendar.getInstance().get(Calendar.DAY_OF_MONTH);
+    }
 }

--
Gitblit v1.8.0