huanghongfa
2021-06-16 602f2f840be38c1cf38e78d2d5b50fd44effaa08
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();
    }
}