mdoTomofumi Chiba
6/27/2024, 11:11:06 AM

Java: 誕生日から年齢を計算

public long getAge(LocalDate birthday) {
    return ChronoUnit.YEARS.between(birthday, LocalDate.now());
}
TweetBlueskyLike