                 returnPaths.append(NSIndexPath(forItem: adjustedCellIndex, inSection: adjustedSection))
             }
         }
-        
         return returnPaths
     }
 }

    
    func pathsFromDates(dates:[NSDate])-> [NSIndexPath] {
        var returnPaths: [NSIndexPath] = []
        
        for date in dates {
            if date >= startOfMonthCache && date <= endOfMonthCache {
                let periodApart = calendar.components(.Month, fromDate: startOfMonthCache, toDate: date, options: [])

    }
    
    func configureChangeOfRows() {
        let layout = calendarView.collectionViewLayout as! JTAppleCalendarLayoutProtocol
        layout.clearCache()
        monthInfo = setupMonthInfoDataForStartAndEndDate()
        
        // Only remove the selected dates and paths if the new layout does nto contain the date
        if pathsFromDates(theSelectedDates).count != theSelectedIndexPaths.count {
            theSelectedDates.removeAll()
            theSelectedIndexPaths.removeAll()
        }

        self.calendarView.reloadData()
    }
    
