laif-ds
Version:
Design System di Laif con componenti React basati su principi di Atomic Design
15 lines (14 loc) • 449 B
JavaScript
"use client";
import { constructFrom as m } from "./constructFrom.js";
import { getDaysInMonth as u } from "./getDaysInMonth.js";
import { toDate as l } from "./toDate.js";
function d(n, o, e) {
const t = l(n, e == null ? void 0 : e.in), a = t.getFullYear(), s = t.getDate(), r = m(n, 0);
r.setFullYear(a, o, 15), r.setHours(0, 0, 0, 0);
const c = u(r);
return t.setMonth(o, Math.min(s, c)), t;
}
export {
d as default,
d as setMonth
};