Files
SnowLuma/.pnpm-store/v11/files/54/b55a3a9d44345f2ba08f11cf7ff4892b8a5731f2618db3683a7f49be7e963cc3bcb26665b8cb787557ddc074640a7e4ce1506e9b7c1051220ca222043d91e9
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

15 lines
367 B
Plaintext

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
};