public int GetSwiftMonthOrYear(string text)
        {
            var trimmedText = text.Trim();
            var swift       = 0;

            if (NextPrefixRegex.IsMatch(trimmedText))
            {
                swift = 1;
            }

            if (PreviousPrefixRegex.IsMatch(trimmedText))
            {
                swift = -1;
            }

            return(swift);
        }
        public int GetSwiftMonthOrYear(string text)
        {
            var trimmedText = text.Trim().Normalized(DateTimeDefinitions.SpecialCharactersEquivalent);
            var swift       = 0;

            if (NextPrefixRegex.IsMatch(trimmedText))
            {
                swift = 1;
            }

            if (PreviousPrefixRegex.IsMatch(trimmedText))
            {
                swift = -1;
            }

            return(swift);
        }
Esempio n. 3
0
        public int GetSwiftPrefix(string text)
        {
            var trimmedText = text.Trim();

            var swift = 0;

            if (FutureRegex.IsMatch(trimmedText))
            {
                swift = 1;
            }
            else if (PreviousPrefixRegex.IsMatch(trimmedText))
            {
                swift = -1;
            }

            return(swift);
        }
        public int GetSwiftMonthOrYear(string text)
        {
            var trimmedText = text.Trim();
            var swift       = 0;

            var afterNextMatch = AfterNextPrefixRegex.Match(text);

            if (afterNextMatch.Success)
            {
                swift = 2;
            }
            else if (NextPrefixRegex.IsMatch(trimmedText))
            {
                swift = 1;
            }
            else if (PreviousPrefixRegex.IsMatch(trimmedText))
            {
                swift = -1;
            }

            return(swift);
        }
        public bool IsCardinalLast(string text)
        {
            var trimmedText = text.Trim().Normalized(DateTimeDefinitions.SpecialCharactersEquivalent);

            return(PreviousPrefixRegex.IsMatch(trimmedText));
        }
Esempio n. 6
0
        public bool IsCardinalLast(string text)
        {
            var trimmedText = text.Trim();

            return(PreviousPrefixRegex.IsMatch(trimmedText));
        }