cdm/src/main/java/ucar/nc2/time/CalendarPeriod.java
public int subtract(CalendarDate start, CalendarDate end) {
    long diff = end.getDifferenceInMsecs(start);
    int thislen = millisecs();
    if ((diff % thislen != 0))
      log.warn("roundoff error");
    return (int) (diff / thislen);
  }
public int subtract(CalendarDate start, CalendarDate end) {
    long diff = end.getDifferenceInMsecs(start);
    int thislen = millisecs();
    if ((diff % thislen != 0))
      log.warn("roundoff error");
    return (int) (diff / thislen);
  }
Subtract two dates, return difference in units of this period.
If not even, will round down and log a warning
@param start start date
@param end   end date
@return  difference in units of this period