"use client";
import { getDefaultOptions as c } from "./_lib/defaultOptions.js";
import { toDate as f } from "./toDate.js";
function O(s, e) {
  const n = c(), a = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, t = f(s, e?.in), o = t.getDay(), r = (o < a ? -7 : 0) + 6 - (o - a);
  return t.setDate(t.getDate() + r), t.setHours(23, 59, 59, 999), t;
}
export {
  O as default,
  O as endOfWeek
};
