public boolean add(Timestamp ts, HiveIntervalDayTime interval,
      Timestamp result) {
    if (ts == null || interval == null) {
      return false;
    }

    nanosResult.addNanos(ts.getNanos(), interval.getNanos());

    long newMillis = ts.toEpochMilli()
        + TimeUnit.SECONDS.toMillis(interval.getTotalSeconds() + nanosResult.seconds);
    result.setTimeInMillis(newMillis, nanosResult.nanos);
    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