"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const getTimezoneOffsetInMilliseconds = require("./_lib-getTimezoneOffsetInMilliseconds.cjs");
const normalizeDates = require("./_lib-normalizeDates.cjs");
const constants = require("./constants.cjs");
const startOfDay = require("./startOfDay.cjs");
function differenceInCalendarDays(laterDate, earlierDate, options) {
  const [laterDate_, earlierDate_] = normalizeDates.normalizeDates(
    options?.in,
    laterDate,
    earlierDate
  );
  const laterStartOfDay = startOfDay.startOfDay(laterDate_);
  const earlierStartOfDay = startOfDay.startOfDay(earlierDate_);
  const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds.getTimezoneOffsetInMilliseconds(laterStartOfDay);
  const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds.getTimezoneOffsetInMilliseconds(earlierStartOfDay);
  return Math.round((laterTimestamp - earlierTimestamp) / constants.millisecondsInDay);
}
exports.default = differenceInCalendarDays;
exports.differenceInCalendarDays = differenceInCalendarDays;
//# sourceMappingURL=differenceInCalendarDays.cjs.map
