"use client";
import { normalizeInterval as l } from "./_lib/normalizeInterval.js";
import { constructFrom as m } from "./constructFrom.js";
function h(s, a) {
  const { start: e, end: n } = l(a?.in, s);
  let r = +e > +n;
  const c = r ? +e : +n, t = r ? n : e;
  t.setHours(0, 0, 0, 0), t.setDate(1);
  let i = 1;
  const o = [];
  for (; +t <= c; )
    o.push(m(e, t)), t.setMonth(t.getMonth() + i);
  return r ? o.reverse() : o;
}
export {
  h as default,
  h as eachMonthOfInterval
};
