             newDateBoundary = dataSource?.configureCalendar(self) {
             // Jt101 do a check in each var to see if
             // user has bad star/end dates
-            let newStartOfMonth =
-                calendar.startOfMonth(for: newDateBoundary.startDate)
-            let newEndOfMonth =
-                calendar.endOfMonth(for: newDateBoundary.endDate)
-            let oldStartOfMonth =
-                calendar.startOfMonth(for: startDateCache)
-            let oldEndOfMonth =
-                calendar.endOfMonth(for: endDateCache)
+            let newStartOfMonth = calendar.startOfMonth(for: newDateBoundary.startDate)
+            let newEndOfMonth   = calendar.endOfMonth(for: newDateBoundary.endDate)
+            let oldStartOfMonth = calendar.startOfMonth(for: startDateCache)
+            let oldEndOfMonth   = calendar.endOfMonth(for: endDateCache)
             if newStartOfMonth != oldStartOfMonth ||
                 newEndOfMonth != oldEndOfMonth ||
                 newDateBoundary.calendar != cachedConfiguration.calendar ||

    fileprivate func updateLayoutItemSize() {
        if dataSource == nil {
            return
        } // If the delegate is not set yet, then return, becaus
          // edelegate methods will be called on the layout
        let layout = calendarViewLayout

        // Invalidate the layout

        return ((cells.min(), cellState), headers.min())
    }

    /// Retrieves the current section
    public func currentSection() -> Int? {
        return minimumVisibleIndexPaths().cellInfo.indexPath?.section
    }
    
    func visibleElements(excludeHeaders: Bool? = false, from rect: CGRect? = nil) -> [UICollectionViewLayoutAttributes] {
        let aRect = rect ?? CGRect(x: calendarView.contentOffset.x + 1, y: calendarView.contentOffset.y + 1, width: calendarView.frame.width - 2, height: calendarView.frame.height - 2)
