public void setDays(int startRange, int endRange, DisabledDaysCriteriaType criteriaType){
        if(criteriaType == DisabledDaysCriteriaType.DAYS_OF_MONTH && startRange >= endRange){
            throw new IllegalArgumentException("startRange must be less than endRange");
        }
        if(startRange < 1){
            throw new IllegalArgumentException("startRange must be more than 0");
        }
        if(endRange < 1){
            throw new IllegalArgumentException("endRange must be more than 0");
        }

        this.criteriaType = criteriaType;

        Set<Integer> days = new TreeSet<>();
        int start, end;
        if(startRange >= endRange){
            start = endRange;
            end = startRange;
        } else {
            start = startRange;
            end = endRange;
        }

        for(int i = start; i<end+1; i++){
            days.add(i);
        }
        validateDays(days);
        this.days = days;
    }
Sets range of disabled days
@param startRange
@param endRange
cosmocalendar/src/main/java/com/applikeysolutions/cosmocalendar/settings/lists/DisabledDaysCriteria.java