Code: Select all
$text2="2009-12-29";
$text4=explode("-",$text2);
if(sizeof($text4)!=3)
{
return false;
}
$text2 = strtotime($text2);
//plus 10 days prequisites
$text3 = strtotime(date("Y-m-d"))+60*60*24*10;
if($text3-$text2>=0)
{
$day=($text3-$text2)/(60*60*24);
echo "hi".$day;
}
else
{
$day=($text3-$text2)/(60*60*24);
echo "he".$day;
}Code: Select all
<?
function isLater($text2){
$text4=explode("-",$text2);
if(sizeof($text4)!=3)
{
return false;
}
$text2 = strtotime($text2);
//plus 10 days prequisites
$text3 = strtotime(date("Y-m-d"))+60*60*24*10;
if($text3-$text2>=0)
{
return false;
}
else
{
return true;
}
}
?>