"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const dayjs = require("dayjs");
function getEndOfWeek(date, firstDayOfWeek = 1) {
  let value = dayjs(date);
  const lastDayOfWeek = firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1;
  while (value.day() !== lastDayOfWeek) {
    value = value.add(1, "day");
  }
  return value.toDate();
}
exports.getEndOfWeek = getEndOfWeek;
