UNPKG

@progress/kendo-react-scheduler

Version:

React Scheduler brings the functionality of Outlook's Calendar to a single UI component. KendoReact Scheduler package

9 lines (8 loc) 862 B
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@progress/kendo-date-math"),D=(n,{step:o,timezone:a})=>{const r=[],g=s.ZonedDate.fromLocalDate(n.start,a),i=s.ZonedDate.fromLocalDate(n.end,a);for(let e=g.clone(),c=0;e.getTime()<i.getTime();c++,e=e.addTime(o)){const t=e.clone(),d=t.clone().addTime(o),l=new Date(t.getTime()),m=new Date(d.getTime()),u={index:c,end:m,start:l,zonedStart:t,zonedEnd:d};r.push(u)}return r};exports.toRanges=D;