laif-ds
Version:
Design System di Laif con componenti React basati su principi di Atomic Design
15 lines (14 loc) • 775 B
JavaScript
"use client";
import { getDefaultOptions as n } from "./_lib/defaultOptions.js";
import { constructFrom as u } from "./constructFrom.js";
import { getWeekYear as W } from "./getWeekYear.js";
import { startOfWeek as i } from "./startOfWeek.js";
function g(r, e) {
var f, s, c, l;
const a = n(), k = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((s = (f = e == null ? void 0 : e.locale) == null ? void 0 : f.options) == null ? void 0 : s.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((l = (c = a.locale) == null ? void 0 : c.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, m = W(r, e), t = u((e == null ? void 0 : e.in) || r, 0);
return t.setFullYear(m, 0, k), t.setHours(0, 0, 0, 0), i(t, e);
}
export {
g as default,
g as startOfWeekYear
};