A better way?

From: Date: Sat, 25 Nov 2000 05:15:03 +0000
Subject: A better way?
Groups: php.general 
Request: Send a blank email to php-general+get-27094@lists.php.net to get a copy of this message
I need to check if a date is correct. The date is in the format of mm/dd/yy. This is how I am doing it and I would like to take advantage of those that have more experience doing this. Many thanks.... Todd $parts = explode("/", $TripDate); if ($parts[2]) { $parts[2] = "20" . $parts[2]; }; if (checkdate($parts[0], $parts[1], $parts[2])) { $badDate = 0; } else { $badDate = 1; }; -- Todd Cary Ariste Software todd@aristesoftware.com

« previous php.general (#27094) next »