Please Log In to save to favorites
TAGs
date, validator, check


Versions
Validate a Gregorian date
by steven
If you make a (birthday) calendar or just want to give somebody the option to add or change a date into your application, it might come in handy to validate the date. This way you can rule out for example that somebody will fill in 30 february as a birthday or set an appointment for 31 september.
      
    1.   /* PHP offers the standard function below to deal with this problem.
    2.   Returns TRUE if the date given is valid; otherwise returns FALSE. */
    3.   
    4.   checkdate ( int $month , int $day , int $year );
Comments