import { addQuarters as l } from "./addQuarters.js";
import { startOfQuarter as a } from "./startOfQuarter.js";
import { toDate as n } from "./toDate.js";
function i(c, s) {
  const f = n(c.start), u = n(c.end);
  let e = +f > +u;
  const m = e ? +a(f) : +a(u);
  let r = e ? a(u) : a(f), t = (s == null ? void 0 : s.step) ?? 1;
  if (!t)
    return [];
  t < 0 && (t = -t, e = !e);
  const d = [];
  for (; +r <= m; )
    d.push(n(r)), r = l(r, t);
  return e ? d.reverse() : d;
}
export {
  i as default,
  i as eachQuarterOfInterval
};
