System.Globalization.DateTimeFormatInfoScanner.AddDateWordOrPostfix C# (CSharp) Method

AddDateWordOrPostfix() private method

private AddDateWordOrPostfix ( String formatPostfix, String str ) : void
formatPostfix String
str String
return void
        internal void AddDateWordOrPostfix(String formatPostfix, String str)
        {
            if (str.Length > 0)
            {
                // Some cultures use . like an abbreviation
                if (str.Equals("."))
                {
                    AddIgnorableSymbols(".");
                    return;
                }
                if (KnownWords[str] == null)
                {
                    if (m_dateWords == null)
                    {
                        m_dateWords = new ArrayList();
                    }
                    if (formatPostfix == "MMMM")
                    {
                        // Add the word into the ArrayList as "\xfffe" + real month postfix.
                        String temp = MonthPostfixChar + str;
                        if (!m_dateWords.Contains(temp))
                        {
                            m_dateWords.Add(temp);
                        }
                    } else
                    {
                        if (!m_dateWords.Contains(str))
                        {
                            m_dateWords.Add(str);
                        }
                        if (str[str.Length - 1] == '.')
                        {
                            // Old version ignore the trialing dot in the date words. Support this as well.
                            String strWithoutDot = str.Substring(0, str.Length - 1);
                            if (!m_dateWords.Contains(strWithoutDot))
                            {
                                m_dateWords.Add(strWithoutDot);                                
                            }
                            
                        }
                    }
                }
            }
            
        }