what does this error mean?
Exception in thread "AWT-EventQueue-0" java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
It only happens for the month of January
this is my line of code
public int computeAge(Date birthDay) throws ParseException {
LocalDate birthdate = LocalDate.of(birthDay.getYear(), birthDay.getMonth(), birthDay.getDay());
LocalDate curDate = LocalDate.now();
Period p = Period.between(birthdate, curDate);
return p.getYears();
}