code: public static java.text.DateFormat getInstance(String pattern) {
          java.text.DateFormat instance;
  
          // if (true) {
          // return new SimpleDateFormat(pattern);
          // }
  
          if (pattern.equals(DATETIME_PATTERN) || pattern.equals(DATETIME_UTC_PATTERN)) {
              instance = new DateTimeFormat(pattern);
          } else if (pattern.equals(DATE_PATTERN)) {
              instance = new DateFormat(pattern);
          } else if (pattern.equals(TIME_PATTERN) || pattern.equals(TIME_UTC_PATTERN)) {
              instance = new TimeFormat(pattern);
          } else {
              if (LOG.isDebugEnabled()) {
                  LOG.debug("unexpected date format pattern: " + pattern);
              }
  
              instance = new SimpleDateFormat(pattern);
          }
          return instance;
      }
docs: Returns DateFormat objects optimized for common iCalendar date patterns. The DateFormats are *not* thread safe.
  Attempts to get or set the Calendar or NumberFormat of an optimized DateFormat will result in an
  UnsupportedOperation exception being thrown.
  
  @param pattern a SimpleDateFormat-compatible pattern
  @return an optimized DateFormat instance if possible, otherwise a normal SimpleDateFormat instance