init
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user