public static List<SelectionBarItem> getSelectedDayListForMultipleMode(List<Day> selectedDays) {
        List<SelectionBarItem> result = new ArrayList<>();

        Calendar tempCalendar = Calendar.getInstance();
        int tempYear = -1;
        int tempMonth = -1;
        for (Day day : selectedDays) {
            tempCalendar.setTime(day.getCalendar().getTime());
            if (tempCalendar.get(Calendar.YEAR) != tempYear || tempCalendar.get(Calendar.MONTH) != tempMonth) {
                result.add(new SelectionBarTitleItem(getYearNameTitle(day)));
                tempYear = tempCalendar.get(Calendar.YEAR);
                tempMonth = tempCalendar.get(Calendar.MONTH);
            }
            result.add(new SelectionBarContentItem(day));
        }
        return result;
    }
Returns selected Days grouped by month/year

@param selectedDays
@return
cosmocalendar/src/main/java/com/applikeysolutions/cosmocalendar/utils/CalendarUtils.java