- date: documentation ( source)
- strtotime: documentation ( source)
- checkdate: documentation ( source)
<?php
function IsDate( $Str )
{
$Stamp = strtotime( $Str );
$Month = date( 'm', $Stamp );
$Day = date( 'd', $Stamp );
$Year = date( 'Y', $Stamp );
return checkdate( $Month, $Day, $Year );
}
echo IsDate('2013-01-01');