UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

19 lines (18 loc) 605 B
import m from "../../factory.js"; import { nowTimestamp as a } from "../../utils.js"; import { startOfMonth as i } from "../../../utils.js"; import { clamp as c } from "../../../../../../../utils/value/number.js"; const p = Object.freeze([0, 1, 0, 0, 0, 0, -1]), u = (e = 0) => { const o = ~~c(0, e, 1 / 0) || 0; return m({ from: ({ now: r, timezone: n, systemToTimezone: s, timezoneToSystem: f }) => { const t = new Date(f(i(r, n))); return t.setMonth(t.getMonth() - o), s(t); }, ...o ? { offsets: p } : { to: a } }); }; export { p as ONE_MONTH_OFFSETS, u as default };