Jennifer Zelazny

Random and Opinionated Thoughts

Tag: helper function

Hints

Check for Valid Date with PHP

Posted by: Jennifer Zelazny | 0 Comments

I stumbled on this handy function this morning when putting together a form that required a valid date (example: 02/30/2011 would not be valid because there are not 30 days in February). Very simple and useful! Checks the validity of the date formed by the arguments. A date is considered valid if each parameter is properly defined. Documentation: http://php.net/manual/en/function.checkdate.php Read more