code: public LocalDate withMonth(int month) {
          if (this.month == month) {
              return this;
          }
          MONTH_OF_YEAR.checkValidValue(month);
          return resolvePreviousValid(year, month, day);
      }
docs: Returns a copy of this {@code LocalDate} with the month-of-year altered.
  <p>
  If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.
  <p>
  This instance is immutable and unaffected by this method call.
  
  @param month  the month-of-year to set in the result, from 1 (January) to 12 (December)
  @return a {@code LocalDate} based on this date with the requested month, not null
  @throws DateTimeException if the month-of-year value is invalid