import { constructFrom as i } from "./constructFrom.js";
import { setMonth as f } from "./setMonth.js";
import { toDate as m } from "./toDate.js";
function s(e, t, n) {
  let r = m(e, n == null ? void 0 : n.in);
  return isNaN(+r) ? i((n == null ? void 0 : n.in) || e, NaN) : (t.year != null && r.setFullYear(t.year), t.month != null && (r = f(r, t.month)), t.date != null && r.setDate(t.date), t.hours != null && r.setHours(t.hours), t.minutes != null && r.setMinutes(t.minutes), t.seconds != null && r.setSeconds(t.seconds), t.milliseconds != null && r.setMilliseconds(t.milliseconds), r);
}
export {
  s as default,
  s as set
};
