UNPKG

@thisisagile/easy

Version:

Straightforward library for building domain-driven microservice architectures

21 lines (20 loc) 525 B
// src/types/IsDate.ts var isDate = (o) => o instanceof Date && !isNaN(o.getTime()); var days = { add: (date, days2) => { date.setDate(date.getDate() + days2); return date; }, today: () => /* @__PURE__ */ new Date(), yesterday: () => days.add(days.today(), -1), tomorrow: () => days.add(days.today(), 1) }; var inPast = (o) => isDate(o) && o <= days.today(); var inFuture = (o) => isDate(o) && o > days.today(); export { isDate, days, inPast, inFuture }; //# sourceMappingURL=chunk-ADJAEGCT.mjs.map