处理问题
This commit is contained in:
parent
2f2376ca4e
commit
4ded4d64d7
@ -6,6 +6,7 @@ import net.sf.jsqlparser.expression.DateTimeLiteralExpression;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.Days;
|
||||
import org.joda.time.LocalDateTime;
|
||||
import org.joda.time.Years;
|
||||
import org.joda.time.format.DateTimeFormat;
|
||||
|
||||
@ -601,8 +602,8 @@ public class IdCardVerifyUtil {
|
||||
|
||||
public static Integer getIdCardAge(String cardNo) {
|
||||
String birthday = getIdCardBirthday(cardNo);
|
||||
DateTime nowDateTime = DateTime.now();
|
||||
DateTime birthdayDateTime = DateTime.parse(birthday, DateTimeFormat.forPattern(ISystemConstant.DATE_FORMATTER_YYYY_MM_DD));
|
||||
LocalDateTime nowDateTime = LocalDateTime.now();
|
||||
LocalDateTime birthdayDateTime = LocalDateTime.parse(birthday, DateTimeFormat.forPattern(ISystemConstant.DATE_FORMATTER_YYYY_MM_DD));
|
||||
return Years.yearsBetween(birthdayDateTime, nowDateTime).getYears();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user