import { n as normalizeUnit } from "./normalizeUnit-bp5SODxw.mjs"; import endOf from "./endOf.mjs"; import parse from "./parse.mjs"; import startOf from "./startOf.mjs"; function isSame(date, input, unit) { unit = normalizeUnit(unit); const inputMs = +parse(input); if (!unit) { return +date === inputMs; } return +startOf(new Date(date), unit) <= inputMs && inputMs <= +endOf(new Date(date), unit); } export { isSame as default };