import u from "../../../utils/getDaysInMonth.js";
function c(e) {
  const n = e.find((t) => t.type === "d"), o = e.find((t) => t.type === "m"), a = e.find((t) => t.type === "y");
  if (!n || !o || n.value.length !== 2 || o.value.length !== 2)
    return;
  const r = parseInt(n.value, 10), i = parseInt(o.value, 10), s = (a == null ? void 0 : a.value.length) === 4 ? parseInt(a.value, 10) : (/* @__PURE__ */ new Date()).getFullYear(), l = u(i, s);
  r > l && (n.value = l.toString().padStart(2, "0"));
}
export {
  c as default
};
//# sourceMappingURL=validateDayForMonth.js.map
