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)

23 lines (22 loc) 629 B
import m from "../factory.js"; import { getRangeTimestampsContextIntegerPropertyFactory as D, nowTimestamp as c } from "../utils.js"; import { startOfDay as f } from "../../utils.js"; const p = 365, y = 1, i = 1, u = D(y, p, i), A = (o) => { const e = u(o); return m( { from: ({ now: r, timezone: a, systemToTimezone: s, timezoneToSystem: n }) => { const t = new Date(n(f(r, a))); return t.setDate(t.getDate() - e.value + 1), s(t); }, to: c }, { numberOfDays: e.descriptor } )(); }; export { i as DEFAULT_NUM_DAYS, p as MAX_NUM_DAYS, y as MIN_NUM_DAYS, A as default };