Return to Snippet

Revision: 58072
at June 23, 2012 07:02 by _reydin_


Initial Code
Check date function
//Check the date
while(!checkdate($month, $day, $year)){
	if($month <= 12 && $day <=31){
		$month++;
		$day = 1;
	}else{
		$year++;
		$month = 1;
		$day = 1;
	}
}

Initial URL


Initial Description
This will check the date and if it is not a valid date then it will increment the month and reset the day back to one.

Initial Title
Validate the date

Initial Tags
date

Initial Language
PHP