public void calculateDayOfWeek(Calendar cal, Date currentTime) {
        Integer nextOccurence = null;

        for(int d : repeatDays) {
            cal.set(Calendar.DAY_OF_WEEK, d);

            if(cal.getTime().after(currentTime)) {
                nextOccurence = d;
                break;
            }
        }
        if(nextOccurence == null) {
            cal.add(Calendar.WEEK_OF_YEAR, 1);
            for(int d : repeatDays) {
                cal.set(Calendar.DAY_OF_WEEK, d);
                if(cal.getTime().after(currentTime)) {
                    break;
                }
            }
        }
    }