关于验证日期时间的问题,急
我在网上找了一个验证日期的正则表达式,在代码中我写了一个方法,返回一个BOOL类型,结果在调用时,不管我输入什么,总时会返回个false   
       //验证输入的日期是否正确 
             protected   bool   GetDate(string   str) 
             { 
                         string   strReg   =   @ "/^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$/ "; 
                         reg   =   new   Regex(strReg); 
                         return   reg.IsMatch(str);       
             } 
 请问这个问题怎么解决.
------解决方案--------------------
贴你代码 !! 
 function isDate_End() 
 {     
   var re =/^20\d{2}-(([1-9]{1})|(0[1-9]{1})|(1[0-2]{1}))-((0[1-9]{1})|([1-9]{1})|([1-2]{1}[0-9]{1})|(3[0-1]{1}))$/; 
    var isValid = true;      
    str=document.all( "txt_EndDate ").value;        
     //结束日期 
       if ( str != " " ) 
   {        
      if( re.test( str) ) 
      { 
         return true; 
      } 
      else 
      { 
        alert( "请输入正确的时间格式!\n如: 年-月-日 "); 
        document.all( "txt_EndDate ").value= " "; 
        document.all( "txt_EndDate ").focus(); 
        return false; 
      } 
    }  
 //    else 
 //  { 
 //    alert( "请输入结束日期 "); 
 //   document.all( "txt_EndDate ").focus(); 
 //  } 
 }