code: private static <T extends java.util.Date> T set(final T date, final int calendarField, final int amount) {
          N.checkArgNotNull(date, "date");
  
          // getInstance() returns a new object, so this method is thread safe.
          final Calendar c = Calendar.getInstance();
          c.setLenient(false);
          c.setTime(date);
          c.set(calendarField, amount);
  
          return createDate(date.getClass(), c.getTimeInMillis());
      }
docs: Copied from Apache Commons Lang under Apache License v2.
  <br />
  
  Sets the specified field to a date returning a new object.
  This does not use a lenient calendar.
  The original {@code Date} is unchanged.
  
  @param date  the date, not null
  @param calendarField  the {@code Calendar} field to set the amount to
  @param amount the amount to set
  @return a new {@code Date} set with the specified value
  @throws IllegalArgumentException if the date is null
  @since 2.4