CK.Core.FileUtil.MatchFileNameUniqueTimeUtcFormat C# (CSharp) Method

MatchFileNameUniqueTimeUtcFormat() public static method

Matches a DateTime in the FileNameUniqueTimeUtcFormat format.
public static MatchFileNameUniqueTimeUtcFormat ( this @this, System.DateTime &time ) : bool
@this this
time System.DateTime Result time on success; otherwise .
return bool
        public static bool MatchFileNameUniqueTimeUtcFormat( this StringMatcher @this, out DateTime time )
        {
            time = Util.UtcMinValue;
            Debug.Assert( FileNameUniqueTimeUtcFormat.Replace( "\\", "" ).Length == 27 );
            return @this.Length >= 27 
                    && DateTime.TryParseExact( @this.Text.Substring( @this.StartIndex, 27 ), FileUtil.FileNameUniqueTimeUtcFormat, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out time )
                ? @this.Forward( 27 )
                : @this.SetError();
        }