import a from "./index-toDate.js";
import g from "./index-differenceInCalendarDays.js";
import c from "./index-requiredArgs.js";
function l(e, r) {
  var n = e.getFullYear() - r.getFullYear() || e.getMonth() - r.getMonth() || e.getDate() - r.getDate() || e.getHours() - r.getHours() || e.getMinutes() - r.getMinutes() || e.getSeconds() - r.getSeconds() || e.getMilliseconds() - r.getMilliseconds();
  return n < 0 ? -1 : n > 0 ? 1 : n;
}
function v(e, r) {
  c(2, arguments);
  var n = a(e), s = a(r), t = l(n, s), o = Math.abs(g(n, s));
  n.setDate(n.getDate() - t * o);
  var i = +(l(n, s) === -t), u = t * (o - i);
  return u === 0 ? 0 : u;
}
export {
  v as default
};
