|
@ -96,7 +96,7 @@ public class IdCardUtil {
|
|
|
public static int getAgeForIdcard(String idcard) {
|
|
|
int age = 0;
|
|
|
|
|
|
if (StringUtils.isEmpty(idcard)) {
|
|
|
if (org.springframework.util.StringUtils.isEmpty(idcard)) {
|
|
|
return age;
|
|
|
}
|
|
|
|
|
@ -106,6 +106,8 @@ public class IdCardUtil {
|
|
|
birth = idcard.substring(6, 14);
|
|
|
} else if (idcard.length() == 15) {
|
|
|
birth = "19" + idcard.substring(6, 12);
|
|
|
}else{
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
int year = Integer.valueOf(birth.substring(0, 4));
|