"use client";
import { constructFrom as i } from "./constructFrom.js";
import { getDaysInMonth as m } from "./getDaysInMonth.js";
import { toDate as u } from "./toDate.js";
function h(n, e, r) {
  const t = u(n, r?.in), s = t.getFullYear(), a = t.getDate(), o = i(n, 0);
  o.setFullYear(s, e, 15), o.setHours(0, 0, 0, 0);
  const c = m(o);
  return t.setMonth(e, Math.min(a, c)), t;
}
export {
  h as default,
  h as setMonth
};
