// src/utils/date.util.ts var ONE_DAY = 24 * 60 * 60 * 1e3; var formatDate = (date) => { const year = date.getFullYear(); const month = (date.getMonth() + 1 + "").padStart(2, "0"); const day = (date.getDate() + "").padStart(2, "0"); return `${year}${month}${day}`; }; var yesterday = (date) => { date = date || /* @__PURE__ */ new Date(); date.setDate(date.getDate() - 1); return date; }; var nextday = (date) => { date = date || /* @__PURE__ */ new Date(); date.setDate(date.getDate() + 1); return date; }; function daysBetween(date1, date2) { const diffInMs = Math.abs(date1.getTime() - date2.getTime()); const diffInDays = Math.round(diffInMs / ONE_DAY); return diffInDays; } export { ONE_DAY, daysBetween, formatDate, nextday, yesterday }; //# sourceMappingURL=date.util.js.map