code: public LocalDate withField(DateTimeFieldType fieldType, int value) {
          if (fieldType == null) {
              throw new IllegalArgumentException("Field must not be null");
          }
          if (isSupported(fieldType) == false) {
              throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
          }
          long instant = fieldType.getField(getChronology()).set(getLocalMillis(), value);
          return withLocalMillis(instant);
      }
docs: Returns a copy of this date with the specified field set to a new value.
  <p>
  For example, if the field type is <code>monthOfYear</code> then the
  month of year field will be changed in the returned instance.
  If the field type is null, then <code>this</code> is returned.
  <p>
  These two lines are equivalent:
  <pre>
  LocalDate updated = dt.withDayOfMonth(6);
  LocalDate updated = dt.withField(DateTimeFieldType.dayOfMonth(), 6);
  </pre>
  
  @param fieldType  the field type to set, not null
  @param value  the value to set
  @return a copy of this date with the field set
  @throws IllegalArgumentException if the field is null or unsupported