UNPKG

devextreme

Version:

JavaScript/TypeScript Component Suite for Responsive Web Development

21 lines (20 loc) 664 B
/** * DevExtreme (esm/__internal/scheduler/view_model/common/trim_interval.js) * Version: 25.2.5 * Build date: Fri Feb 20 2026 * * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ export const trimInterval = _ref => { let { min: min, max: max } = _ref; const maxMinusDay = new Date(max - 1).setUTCHours(0, 0, 0, 0); const maxMinusDayDate = new Date(maxMinusDay); return { min: new Date(min).setUTCHours(0, 0, 0, 0), max: maxMinusDayDate.setDate(maxMinusDayDate.getDate() + 1) } };