             }
         }
 
-        let sortedChangedDays = changedDayDates.sorted { (smaller, larger) -> Bool in
-            let diff1 = abs(smaller.dayInYear - self.activeDay.dayInYear)
-            let diff2 = abs(larger.dayInYear - self.activeDay.dayInYear)
-            return diff1 == diff2 ? smaller > larger : diff1 < diff2
-        }
-
         self.eventsData = newEventsData
         self.allDayEventsData = newAllDayEvents
         for cell in self.dayCollectionView.visibleCells {

                }
            }
        }
        // Process events for days with changed data
        for dayDate in sortedChangedDays {
            self.processEventsData(forDayDate: dayDate)
        }

    }

    private func processEventsData(forDayDate dayDate: DayDate) {
        let calc = FrameCalculator(date: dayDate)
        calc.delegate = self
        frameCalculators[dayDate]?.cancelCalculation()
