import { normalizeDates as m } from "./_lib/normalizeDates.js";
import { compareAsc as f } from "./compareAsc.js";
import { differenceInCalendarYears as o } from "./differenceInCalendarYears.js";
function D(l, s, a) {
  const [e, r] = m(
    a == null ? void 0 : a.in,
    l,
    s
  ), t = f(e, r), c = Math.abs(o(e, r));
  e.setFullYear(1584), r.setFullYear(1584);
  const i = f(e, r) === -t, n = t * (c - +i);
  return n === 0 ? 0 : n;
}
export {
  D as default,
  D as differenceInYears
};
