function intervalToDuration(_ref) {
  var start = _ref.start,
      end = _ref.end;
  __WEBPACK_IMPORTED_MODULE_8__lib_requiredArgs_index_js__["a" /* default */](1, arguments);
  var dateLeft = __WEBPACK_IMPORTED_MODULE_9__toDate_index_js__["a" /* default */](start);
  var dateRight = __WEBPACK_IMPORTED_MODULE_9__toDate_index_js__["a" /* default */](end);

  if (!__WEBPACK_IMPORTED_MODULE_7__isValid_index_js__["a" /* default */](dateLeft)) {
    throw new RangeError('Start Date is invalid');
  }

  if (!__WEBPACK_IMPORTED_MODULE_7__isValid_index_js__["a" /* default */](dateRight)) {
    throw new RangeError('End Date is invalid');
  }

  var duration = {
    years: 0,
    months: 0,
    days: 0,
    hours: 0,
    minutes: 0,
    seconds: 0
  };
  var sign = __WEBPACK_IMPORTED_MODULE_0__compareAsc_index_js__["a" /* default */](dateLeft, dateRight);
  duration.years = Math.abs(__WEBPACK_IMPORTED_MODULE_1__differenceInYears_index_js__["a" /* default */](dateLeft, dateRight));
  var remainingMonths = __WEBPACK_IMPORTED_MODULE_10__sub_index_js__["a" /* default */](dateLeft, {
    years: sign * duration.years
  });
  duration.months = Math.abs(__WEBPACK_IMPORTED_MODULE_2__differenceInMonths_index_js__["a" /* default */](remainingMonths, dateRight));
  var remainingDays = __WEBPACK_IMPORTED_MODULE_10__sub_index_js__["a" /* default */](remainingMonths, {
    months: sign * duration.months
  });
  duration.days = Math.abs(__WEBPACK_IMPORTED_MODULE_3__differenceInDays_index_js__["a" /* default */](remainingDays, dateRight));
  var remainingHours = __WEBPACK_IMPORTED_MODULE_10__sub_index_js__["a" /* default */](remainingDays, {
    days: sign * duration.days
  });
  duration.hours = Math.abs(__WEBPACK_IMPORTED_MODULE_4__differenceInHours_index_js__["a" /* default */](remainingHours, dateRight));
  var remainingMinutes = __WEBPACK_IMPORTED_MODULE_10__sub_index_js__["a" /* default */](remainingHours, {
    hours: sign * duration.hours
  });
  duration.minutes = Math.abs(__WEBPACK_IMPORTED_MODULE_5__differenceInMinutes_index_js__["a" /* default */](remainingMinutes, dateRight));
  var remainingSeconds = __WEBPACK_IMPORTED_MODULE_10__sub_index_js__["a" /* default */](remainingMinutes, {
    minutes: sign * duration.minutes
  });
  duration.seconds = Math.abs(__WEBPACK_IMPORTED_MODULE_6__differenceInSeconds_index_js__["a" /* default */](remainingSeconds, dateRight));
  return duration;
}
@name isAfter
@category Common Helpers
@summary Is the first date after the second one?

@description
Is the first date after the second one?

### v2.0.0 breaking changes:

- [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).

@param {Date|Number} date - the date that should be after the other one to return true
@param {Date|Number} dateToCompare - the date to compare with
@returns {Boolean} the first date is after the second date
@throws {TypeError} 2 arguments required

@example
// Is 10 July 1989 after 11 February 1987?
var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))
//=> true