Zend - The PHP Company




Date & Time

Add Code


valid date  

Type: code fragment
Added by: idban
Entered: 23/08/2001
Last modified: 08/12/2000
Rating: - (fewer than 3 votes)
Views: 8040
checkin' valid date


<?
//freely distributed 
//idban 2000

$t=strtotime($d);
$conv=date("n/j/Y",$t+(0*3600));
if (
$conv == $d) {
echo 
"$d == valid";
} else { echo
"$d should be $conv"; }
?>


Usage Example


scripts.php?d=2/29/2001
scripts.php?d=2/29/2004


Rate This Script





Search



This Category All Categories