From 65bfa92befa25fa54760956c7604707a0e0a0fc1 Mon Sep 17 00:00:00 2001 From: CeDo <cedoogle@gmail.com> Date: 星期五, 11 六月 2021 16:42:27 +0800 Subject: [PATCH] bugfixed:导入去重&更新已存在记录 --- springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/AgeUtils.java | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/AgeUtils.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/AgeUtils.java index 411306a..ebc574b 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/AgeUtils.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/AgeUtils.java @@ -12,8 +12,8 @@ public static int getAgeFromBirthTime(String birthTimeString) { // 先截取到字符串中的年、月、日 int selectYear = Integer.parseInt(birthTimeString.substring(0,4)); - int selectMonth = Integer.parseInt(birthTimeString.substring(4,6)); - int selectDay = Integer.parseInt(birthTimeString.substring(6,8)); + int selectMonth = Integer.parseInt(birthTimeString.substring(5,7)); + int selectDay = Integer.parseInt(birthTimeString.substring(8)); // 得到当前时间的年、月、日 Calendar cal = Calendar.getInstance(); int yearNow = cal.get(Calendar.YEAR); @@ -129,6 +129,5 @@ String year = yese.substring(0,4); String month = yese.substring(4,6); String ri = yese.substring(6,8); - System.out.println(); } } -- Gitblit v1.7.1