📅  最后修改于: 2022-03-11 14:52:30.288000             🧑  作者: Mango
public int calculateAge(
LocalDate birthDate,
LocalDate currentDate) {
// validate inputs ...
return Period.between(birthDate, currentDate).getYears();
}