From e7c3ff19f5abea1f1510503b46f99c6ad3870410 Mon Sep 17 00:00:00 2001 From: chenjiahe <763432473@qq.com> Date: 星期五, 19 八月 2022 18:28:46 +0800 Subject: [PATCH] 判断excel文件 --- src/main/java/com/hx/util/DateUtil.java | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/hx/util/DateUtil.java b/src/main/java/com/hx/util/DateUtil.java index 258a55e..9b18d81 100644 --- a/src/main/java/com/hx/util/DateUtil.java +++ b/src/main/java/com/hx/util/DateUtil.java @@ -302,6 +302,18 @@ } } + /**鏃堕棿涓婄鍙犲姞 + * @Author: ChenJiaHe + * @param dateTime 鏃堕棿 + * @param second 绉� + * @return + */ + public static Date addSecond(Date dateTime,int second){ + Calendar c = Calendar.getInstance(); + c.setTime(dateTime); + c.add(Calendar.SECOND, second); + return c.getTime(); + } /**鏃堕棿涓婂垎閽熷彔鍔� * @Author: ChenJiaHe @@ -470,7 +482,7 @@ } boolean status = false; if(formatDate(startTime,"yyyyMMdd").equals(formatDate(endTime,"yyyyMMdd"))){ - status = false; + status = true; } return status; } -- Gitblit v1.8.0