public boolean add(HiveIntervalYearMonth interval, Date dt, Date result) {
    if (dt == null || interval == null) {
      return false;
    }

    long resultMillis = addMonthsToMillis(dt.toEpochMilli(), interval.getTotalMonths());
    result.setTimeInMillis(resultMillis);
    return true;
  }
Perform date + int operation .
@param dt the date
@param interval the int (days)
@return the resulting date
ql/src/java/org/apache/hadoop/hive/ql/util/DateTimeMath.java