UNPKG

@modern-kit/utils

Version:
18 lines (14 loc) 531 B
'use strict'; var dateParseDate = require('../parseDate/index.cjs'); require('../parseDateString/index.cjs'); function isBeforeDate({ targetDate, compareDate = /* @__PURE__ */ new Date(), inclusive = false }) { const targetDateTime = dateParseDate.parseDate(targetDate).getTime(); const compareDateTime = dateParseDate.parseDate(compareDate).getTime(); return inclusive ? targetDateTime <= compareDateTime : targetDateTime < compareDateTime; } exports.isBeforeDate = isBeforeDate; //# sourceMappingURL=index.cjs.map