private void validateDays(Set<Integer> days){
        int maxPossibleValue;
        switch (criteriaType){
            case DAYS_OF_MONTH:
                maxPossibleValue = MAX_DAYS_COUNT_IN_MONTH;
                break;

            default:
                maxPossibleValue = MAX_DAYS_COUNT_IN_WEEK;
                break;
        }

        for(int day : days){
            if(day > maxPossibleValue){
                throw new IllegalArgumentException("Invalid day:"+day);
            }
        }
    }
Sets range of disabled days
@param startRange
@param endRange
cosmocalendar/src/main/java/com/applikeysolutions/cosmocalendar/settings/lists/DisabledDaysCriteria.java