/// <summary>
/// 是否为日期型字符串
/// </summary>
/// <param name=StrSource>日期字符串()</param>
/// <returns></returns>
public static bool IsDate(string StrSource)
{
return RegexIsMatch(StrSource @^(((([]|[]\d)\d{})(?[]|[])(?[]|[]\d|[]))|((([]|[]\d)\d{})(?[]|[])(?[]|[]\d|))|((([]|[]\d)\d{})?(?[]|\d|[]))|((([]|[]\d)([]|[][]|[][])|((|[][]|[][])))?))$);
}
/// <summary>
/// 是否为时间型字符串
/// </summary>
/// <param name=source>时间字符串(::)</param>
/// <returns></returns>
public static bool IsTime(string StrSource)
{
return RegexIsMatch(StrSource @^((||||[]?\d):[]?\d:[]?\d)$);
}
/// <summary>
/// 是否为日期+时间型字符串
/// </summary>
/// <param name=source></param>
/// <returns></returns>
public static bool IsDateTime(string StrSource)
{
return RegexIsMatch(StrSource @^((((([]|[]\d)\d{})(?[]|[])(?[]|[]\d|[]))|((([]|[]\d)\d{})(?[]|[])(?[]|[]\d|))|((([]|[]\d)\d{})?(?[]|\d|[]))|((([]|[]\d)([]|[][]|[][])|((|[][]|[][])))?)) (||||[]?\d):[]?\d:[]?\d)$ );
}