import { getTimezoneOffsetInMilliseconds } from "./_lib-getTimezoneOffsetInMilliseconds.js";
import { normalizeDates } from "./_lib-normalizeDates.js";
import { millisecondsInDay } from "./constants.js";
import { startOfDay } from "./startOfDay.js";
function differenceInCalendarDays(laterDate, earlierDate, options) {
  const [laterDate_, earlierDate_] = normalizeDates(
    options?.in,
    laterDate,
    earlierDate
  );
  const laterStartOfDay = startOfDay(laterDate_);
  const earlierStartOfDay = startOfDay(earlierDate_);
  const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
  const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
  return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
}
export {
  differenceInCalendarDays as default,
  differenceInCalendarDays
};
//# sourceMappingURL=differenceInCalendarDays.js.map
