import { _ as i, f as u, g as o } from "./format.js";
function c(r, n, t) {
  const e = o(r, t?.in);
  if (isNaN(n)) return i(t?.in || r, NaN);
  if (!n) return e;
  const a = e.getDate(), s = i(t?.in || r, e.getTime());
  return s.setMonth(e.getMonth() + n + 1, 0), a >= s.getDate() ? s : (e.setFullYear(s.getFullYear(), s.getMonth(), a), e);
}
function f(r, n) {
  const t = o(r, n?.in), e = t.getMonth();
  return t.setFullYear(t.getFullYear(), e + 1, 0), t.setHours(23, 59, 59, 999), t;
}
function g(r, n) {
  const [t, e] = u(r, n.start, n.end);
  return {
    start: t,
    end: e
  };
}
function h(r, n) {
  const t = o(r, n?.in);
  return t.setDate(1), t.setHours(0, 0, 0, 0), t;
}
function M(r, n, t) {
  const [e, a] = u(t?.in, r, n);
  return e.getFullYear() === a.getFullYear() && e.getMonth() === a.getMonth();
}
export {
  c as a,
  f as i,
  h as n,
  g as r,
  M as t
};

//# sourceMappingURL=isSameMonth.js.map