Durante:
Después:
El video:
public static bool IsDate(string inputDate)
{
bool isDate = true;
try{
DateTime dateValue;
dateValue = DateTime.ParseExact(inputDate,"yyyy-MM-dd",null);
}
catch{
isDate = false;
}
return isDate;
}
using System.Text.RegularExpressions;
public static bool isRFC(string tsInputRFC)
{
string lsPatron = @"^[A-ZÑ&]{3,4}[0-9]{2}[0-1][0-9][0-3][0-9][A-Z,0-9][A-Z,0-9][0-9A]$";
Regex loRE = new Regex(lsPatron);
if (loRE.IsMatch(tsInputRFC))
return true;
else
return false;
}