import i from "./index-toInteger.js";
import h from "./index-toDate.js";
import u from "./index-getDaysInMonth.js";
import d from "./index-requiredArgs.js";
function l(a, o) {
  d(2, arguments);
  var t = h(a), e = i(o), n = t.getFullYear(), m = t.getDate(), r = /* @__PURE__ */ new Date(0);
  r.setFullYear(n, e, 15), r.setHours(0, 0, 0, 0);
  var s = u(r);
  return t.setMonth(e, Math.min(m, s)), t;
}
export {
  l as default
};
