"use client";
import { constructFrom as o } from "./constructFrom.js";
import { startOfISOWeek as a } from "./startOfISOWeek.js";
import { toDate as m } from "./toDate.js";
function Y(f, n) {
  const e = m(f, n?.in), t = e.getFullYear(), r = o(e, 0);
  r.setFullYear(t + 1, 0, 4), r.setHours(0, 0, 0, 0);
  const u = a(r), s = o(e, 0);
  s.setFullYear(t, 0, 4), s.setHours(0, 0, 0, 0);
  const i = a(s);
  return e.getTime() >= u.getTime() ? t + 1 : e.getTime() >= i.getTime() ? t : t - 1;
}
export {
  Y as default,
  Y as getISOWeekYear
};
