public static boolean isDayInSet(Day day, Set<Long> daysInSet) {
        for (long disabledTime : daysInSet) {
            Calendar disabledDayCalendar = DateUtils.getCalendar(disabledTime);
            if (day.getCalendar().get(Calendar.YEAR) == disabledDayCalendar.get(Calendar.YEAR)
                    && day.getCalendar().get(Calendar.DAY_OF_YEAR) == disabledDayCalendar.get(Calendar.DAY_OF_YEAR)) {
                return true;
            }
        }
        return false;
    }
Sets variables(isWeekend, isDisabled, isFromConnectedCalendar) to day
cosmocalendar/src/main/java/com/applikeysolutions/cosmocalendar/utils/CalendarUtils.java