View Single Post
Old 12-05-2007, 12:52 AM   #5 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Quote:
Originally Posted by Salathe View Post
The "date" 99/99/9999 would be accepted. It's probably wiser to use one or more of PHP's date functions, or some other method, if you want to check that the date supplied is an actual, valid, date.
Top post. Thanks! For the above checking, the checkdate has never failed me. Simply pass it in a date and it will tell you if it's valid. It will even check if the amount of days for the specified month is correct, and even takes into consideration leap years! Can't beat that function, in my opinion, and I'm confident there's just no way any one regular expression could ever match that.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote