From a1ed31a624e7cf3d2f6c1c6582d853110c1867d0 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期一, 06 九月 2021 10:19:20 +0800 Subject: [PATCH] bug修复 --- springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java index 7570360..a69c65d 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java @@ -758,6 +758,12 @@ return instance.get(Calendar.MONTH); } + public static int getYear(Date date) { + Calendar instance = Calendar.getInstance(); + instance.setTime(date); + return instance.get(Calendar.YEAR); + } + public static boolean before(Date start, Date end) { Calendar date1 = Calendar.getInstance(); date1.setTime(start); @@ -883,6 +889,5 @@ // Date after = new Date(); // System.out.println(getFirstDayOfMonthString()); // System.out.println(getDayOfMonthString()); - } } -- Gitblit v1.7.1