This commit is contained in:
张良(004796)
2024-03-19 15:20:14 +08:00
parent 6fa752d8a8
commit 979d89eeac
25 changed files with 549 additions and 26 deletions

View File

@@ -12,4 +12,10 @@ public class BirthdayUtil {
return year.substring(year.length() - 2);
}
public static Integer getAge(LocalDate birthday) {
if(birthday == null){
return null;
}
return LocalDate.now().getYear() - birthday.getYear();
}
}