code: public void addTo(Date date) {
  
          // check data parameter
          if (date == null) {
              throw new NullPointerException("date == null");
          }
  
          Calendar cal = new GregorianCalendar();
          cal.setTime(date);
          this.addTo(cal);
          date.setTime(getCalendarTimeInMillis(cal));
      }
docs: Adds this duration to a {@link Date} object.
  
  <p>
  The given date is first converted into
  a {@link java.util.GregorianCalendar}, then the duration
  is added exactly like the {@link #addTo(Calendar)} method.
  
  <p>
  The updated time instant is then converted back into a
  {@link Date} object and used to update the given {@link Date} object.
  
  <p>
  This somewhat redundant computation is necessary to unambiguously
  determine the duration of months and years.
  
  @param date
  A date object whose value will be modified.
  @throws NullPointerException
  if the date parameter is null.