code: public static IsoRecurrence<DateInterval> parseDateIntervals(String iso)
          throws ParseException {
  
          String[] parts = iso.split("/");
          int count = parseCount(parts);
          boolean infinite = false;
  
          if (count == INFINITE) {
              count = 0;
              infinite = true;
          }
  
          IsoRecurrence<DateInterval> recurrence;
  
          if (parts[2].charAt(0) == 'P') {
              PlainDate start = Iso8601Format.parseDate(parts[1]);
              Duration<? extends IsoDateUnit> duration = Duration.parseCalendarPeriod(parts[2]);
              recurrence = IsoRecurrence.of(count, start, duration);
          } else if (parts[1].charAt(0) == 'P') {
              Duration<? extends IsoDateUnit> duration = Duration.parseCalendarPeriod(parts[1]);
              PlainDate end = Iso8601Format.parseDate(parts[2]);
              recurrence = IsoRecurrence.of(count, duration, end);
          } else {
              DateInterval interval = DateInterval.parseISO(iso.substring(getFirstSlash(iso) + 1));
              PlainDate start = interval.getStart().getTemporal();
              PlainDate end = interval.getEnd().getTemporal();
              recurrence = IsoRecurrence.of(count, start, end);
          }
  
          if (infinite) {
              recurrence = recurrence.withInfiniteCount();
          }
  
          return recurrence;
  
      }
docs: /*[deutsch]
  <p>Interpretiert einen Text wie &quot;R5/2016-04-01/2016-04-30&quot; oder &quot;R5/2016-04-01/P1M&quot;
  als eine Sequenz von wiederkehrenden Datumsintervallen. </p>
  
  @param   iso     canonical representation of recurrent date intervals
  @return  parsed sequence of recurrent closed date intervals
  @throws  ParseException in any case of inconsistencies