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