UNPKG

devextreme

Version:

JavaScript/TypeScript Component Suite for Responsive Web Development

27 lines (26 loc) 812 B
/** * DevExtreme (cjs/__internal/scheduler/view_model/common/trim_interval.js) * Version: 25.2.7 * Build date: Tue May 05 2026 * * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.trimInterval = void 0; 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) } }; exports.trimInterval = trimInterval;