private Token parseCharacterTemporalToken(String originalPattern, String candidate,
      boolean fillMode, int begin) {
    // keep original case
    candidate = originalPattern.substring(begin, begin + candidate.length());

    Token lastAddedToken = new Token(TokenType.CHARACTER_TEMPORAL,
        CHARACTER_TEMPORAL_TOKENS.get(candidate.toLowerCase()), candidate,
        getTokenStringLength(candidate), fillMode);
    tokens.add(lastAddedToken);
    return lastAddedToken;
  }
Parse pattern to list of tokens.
common/src/java/org/apache/hadoop/hive/common/format/datetime/HiveSqlDateTimeFormatter.java