From 59fb524d6b081f0faba177ffd13a0132d314dbae Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期二, 19 十一月 2024 14:15:49 +0800 Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit --- server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java b/server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java index 5ca5eba..a879505 100644 --- a/server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java +++ b/server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java @@ -460,7 +460,7 @@ * @return String * @throws Exception */ - public static String getPlusTime(Date date) throws Exception { + public static String getPlusTime(Date date) { if (date == null) return null; try { @@ -1283,6 +1283,9 @@ * @return */ public static Date getXMinuteAfterDate(Date date, int minute) { + if(date ==null){ + date = new Date(); + } Calendar now = Calendar.getInstance(); now.setTime(date); now.set(Calendar.MINUTE, now.get(Calendar.MINUTE) + minute); @@ -1635,6 +1638,13 @@ return ""; } } + public static String getFirstDayCurrentMonth() { + try { + return getDateLong(new Date()).substring(0, 7) + "-01"; + } catch (Exception e) { + return ""; + } + } /** * 灏唝yyyMM鍚勫紡杞崲鎴恲yyy骞碝M鏈堟牸寮� -- Gitblit v1.9.3