Check for Valid Date with PHP

Hints

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!

checkdate ( int $month , int $day , int $year )

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

Leave a Reply

Your email address will not be published.
*
*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Games

A Great Look At Mario Through the Years

While I did not play all the Mario games in the article: EVolution of Mario – I played most, and still enjoy some Mario 2 or Mario 3 weekly. Makes me even more excited for the upcoming Mario game:

Random

Re-watching He-Man

I loved growing up in the 1980s and Netflix is giving me the ability to watch some of my favorite shows. As a young kid – I loved going to my cousin’s house and playing with him and his He-Man action figures (especially the He-Man with the spinning chest that looked like a punched vs. […]