public static boolean isDayDisabledByCriteria(Day day, DisabledDaysCriteria criteria) {
        int field = -1;
        switch (criteria.getCriteriaType()){
            case DAYS_OF_MONTH:
                field = Calendar.DAY_OF_MONTH;
                break;

            case DAYS_OF_WEEK:
                field = Calendar.DAY_OF_WEEK;
                break;
        }

        for(int dayInt : criteria.getDays()){
            if(dayInt == day.getCalendar().get(field)){
                return true;
            }
        }
        return false;
    }
Sets variables(isWeekend, isDisabled, isFromConnectedCalendar) to day
cosmocalendar/src/main/java/com/applikeysolutions/cosmocalendar/utils/CalendarUtils.java