From 6fd54e9bfb42e8b75758d7cb061b7bbd5c1aa4f7 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 17 四月 2025 10:18:29 +0800
Subject: [PATCH] 代码初始化

---
 server/src/main/java/com/doumee/core/utils/DateUtil.java |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/server/src/main/java/com/doumee/core/utils/DateUtil.java b/server/src/main/java/com/doumee/core/utils/DateUtil.java
index 17439fd..d906a52 100644
--- a/server/src/main/java/com/doumee/core/utils/DateUtil.java
+++ b/server/src/main/java/com/doumee/core/utils/DateUtil.java
@@ -577,15 +577,16 @@
      * @return String
      * @throws Exception
      */
-    public static String getNowYear() throws Exception {
+    public static String getNowYear() {
         String nowYear = "";
         try {
             String strTemp = getNowLongTime();
             nowYear = strTemp.substring(0, 4);
             return nowYear;
         } catch (Exception e) {
-            throw e;
+          e.printStackTrace();
         }
+        return nowYear;
     }
 
     /**
@@ -594,15 +595,16 @@
      * @return String
      * @throws Exception
      */
-    public static Integer getNowMonth() throws Exception {
+    public static Integer getNowMonth()   {
         String nowMonth = "";
         try {
             String strTemp = getNowLongTime();
             nowMonth = strTemp.substring(4, 6);
             return Integer.valueOf(nowMonth);
         } catch (Exception e) {
-            throw e;
+            e.printStackTrace();
         }
+        return null;
     }
 
     /**
@@ -611,15 +613,16 @@
      * @return String
      * @throws Exception
      */
-    public static String getNowDay() throws Exception {
+    public static String getNowDay()  {
         String nowDay = "";
         try {
             String strTemp = getNowLongTime();
             nowDay = strTemp.substring(6, 8);
             return nowDay;
         } catch (Exception e) {
-            throw e;
+            e.printStackTrace();
         }
+        return  nowDay;
     }
 
     /**

--
Gitblit v1.9.3