import { normalizeInterval as m } from "./_lib/normalizeInterval.js";
import { constructFrom as d } from "./constructFrom.js";
function h(f, e) {
  const { start: s, end: c } = m(e == null ? void 0 : e.in, f);
  let t = +s > +c;
  const l = t ? +s : +c, r = t ? c : s;
  r.setHours(0, 0, 0, 0);
  let a = (e == null ? void 0 : e.step) ?? 1;
  if (!a)
    return [];
  a < 0 && (a = -a, t = !t);
  const u = [];
  for (; +r <= l; )
    u.push(d(s, r)), r.setDate(r.getDate() + a), r.setHours(0, 0, 0, 0);
  return t ? u.reverse() : u;
}
export {
  h as default,
  h as eachDayOfInterval
};
