Java: 誕生日から年齢を計算 public long getAge(LocalDate birthday) { return ChronoUnit.YEARS.between(birthday, LocalDate.now()); }