mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-27 22:30:56 +00:00
13 lines
314 B
JavaScript
13 lines
314 B
JavaScript
'use client';
|
|
import dayjs from 'dayjs';
|
|
import isoWeek from 'dayjs/plugin/isoWeek.js';
|
|
|
|
dayjs.extend(isoWeek);
|
|
function getWeekNumber(week) {
|
|
const monday = week.find((date) => dayjs(date).day() === 1);
|
|
return dayjs(monday).isoWeek();
|
|
}
|
|
|
|
export { getWeekNumber };
|
|
//# sourceMappingURL=get-week-number.mjs.map
|