import n from "./index-toDate.js";
import d from "./index-requiredArgs.js";
function p(u, r) {
  var t;
  d(1, arguments);
  var i = u || {}, s = n(i.start), m = n(i.end), o = m.getTime();
  if (!(s.getTime() <= o))
    throw new RangeError("Invalid interval");
  var v = [], e = s;
  e.setHours(0, 0, 0, 0);
  var a = Number((t = r == null ? void 0 : r.step) !== null && t !== void 0 ? t : 1);
  if (a < 1 || isNaN(a)) throw new RangeError("`options.step` must be a number greater than 1");
  for (; e.getTime() <= o; )
    v.push(n(e)), e.setDate(e.getDate() + a), e.setHours(0, 0, 0, 0);
  return v;
}
export {
  p as default
};
