code: private int getDaysToNextMatch(WeekDay weekDay) {
  
          for (WeekDay wd : m_weekDays) {
              if (wd.compareTo(weekDay) > 0) {
                  return wd.toInt() - weekDay.toInt();
              }
          }
          return (m_weekDays.iterator().next().toInt() + (m_interval * I_CmsSerialDateValue.NUM_OF_WEEKDAYS))
              - weekDay.toInt();
      }
docs: Returns the number of days from the given weekday to the next weekday the event should occur.
  @param weekDay the current weekday.
  @return the number of days to the next weekday an event could occur.