code: private int getLastDayOfMonth(YearMonth yearMonth) {
          LocalDate firstDayOfMonth = LocalDate.of(yearMonth.getYear(), yearMonth.getMonth(), 1);
          int lastDayOfMonth = firstDayOfMonth.lengthOfMonth();
          return lastDayOfMonth;
      }
docs: getLastDayOfMonth, This returns the last day of the month for the specified year and month.
  
  Implementation notes: As of this writing, the below implementation is verified to work
  correctly for negative years, as those years are to defined in the iso 8601 your format that
  is used by java.time.YearMonth. This functionality can be tested by by checking to see if to
  see if the year "-0004" is correctly displayed as a leap year. Leap years have 29 days in
  February. There should be 29 days in the month of "February 1, -0004".