code: static boolean isFieldUnitIgnored(String pattern, int field) {
          int fieldLevel = CALENDAR_FIELD_TO_LEVEL[field];
          int level;
          char ch;
          boolean inQuote = false;
          char prevCh = 0;
          int count = 0;
  
          for (int i = 0; i < pattern.length(); ++i) {
              ch = pattern.charAt(i);
              if (ch != prevCh && count > 0) {
                  level = getLevelFromChar(prevCh);
                  if (fieldLevel <= level) {
                      return false;
                  }
                  count = 0;
              }
              if (ch == '\'') {
                  if ((i+1) < pattern.length() && pattern.charAt(i+1) == '\'') {
                      ++i;
                  } else {
                      inQuote = ! inQuote;
                  }
              } else if (!inQuote && isSyntaxChar(ch)) {
                  prevCh = ch;
                  ++count;
              }
          }
          if (count > 0) {
              // last item
              level = getLevelFromChar(prevCh);
              if (fieldLevel <= level) {
                  return false;
              }
          }
          return true;
      }
docs: /*
  Check whether the 'field' is smaller than all the fields covered in
  pattern, return true if it is.
  The sequence of calendar field,
  from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,...
  @param pattern  the pattern to check against
  @param field    the calendar field need to check against
  @return         true if the 'field' is smaller than all the fields
  covered in pattern. false otherwise.