@mantine/dates
Version:
Calendars, date and time pickers based on Mantine components
12 lines (11 loc) • 389 B
JavaScript
"use client";
import dayjs from "dayjs";
import isoWeek from "dayjs/plugin/isoWeek.js";
//#region packages/@mantine/dates/src/components/Month/get-week-number/get-week-number.ts
dayjs.extend(isoWeek);
function getWeekNumber(week) {
return dayjs(week.find((date) => dayjs(date).day() === 1)).isoWeek();
}
//#endregion
export { getWeekNumber };
//# sourceMappingURL=get-week-number.mjs.map