docs: protected final boolean isDurationValid() {
  
          if (isValidEndTypeForPattern()) {
              switch (getEndType()) {
                  case DATE:
                      return (getStart().getTime() < (getSeriesEndDate().getTime() + DAY_IN_MILLIS));
                  case TIMES:
                      return getOccurrences() > 0;
                  case SINGLE:
                      return true;
                  default:
                      return false;
              }
          } else {
              return false;
          }
      }