From d66fe6d46cdbaeb88e68ad96da6deb0b35cd131b Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期五, 15 十一月 2024 11:36:28 +0800
Subject: [PATCH] 清理无用代码

---
 smart-man-boot/src/main/java/com/qianwen/smartman/common/utils/LocalDateTimeUtils.java |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/smart-man-boot/src/main/java/com/qianwen/smartman/common/utils/LocalDateTimeUtils.java b/smart-man-boot/src/main/java/com/qianwen/smartman/common/utils/LocalDateTimeUtils.java
index b23a044..1bc5410 100644
--- a/smart-man-boot/src/main/java/com/qianwen/smartman/common/utils/LocalDateTimeUtils.java
+++ b/smart-man-boot/src/main/java/com/qianwen/smartman/common/utils/LocalDateTimeUtils.java
@@ -79,12 +79,23 @@
         return time.withHour(23).withMinute(59).withSecond(59).withNano(999999999);
     }
 
+    /**
+     * 璁$畻涓�骞寸殑澶╂暟
+     * @param year 骞翠唤
+     * @return year鎸囧畾鐨勫勾浠芥�诲ぉ鏁�
+     */
     public static Integer getDayOfYear(Integer year) {
-        return Integer.valueOf(LocalDate.of(year.intValue(), 1, 1).isLeapYear() ? 366 : 365);
+        return Integer.valueOf(LocalDate.of(year, 1, 1).isLeapYear() ? 366 : 365);
     }
 
+    /**
+     * 璁$畻2涓棩鏈熷ぉ鏁扮殑宸� endDate-startDate
+     * @param startDate
+     * @param endDate
+     * @return
+     */
     public static Integer getDifference(LocalDate startDate, LocalDate endDate) {
-        Long l = Long.valueOf(endDate.toEpochDay() - startDate.toEpochDay());
+        Long l = Long.valueOf(endDate.toEpochDay() - startDate.toEpochDay());//l.intValue()
         Integer difference = Integer.valueOf(Integer.parseInt(l.toString()));
         return difference;
     }

--
Gitblit v1.9.3