I have created a script for you to fiddle with and is below. The below script is a function where you can enter the number of days, months and years untill the future date and the function will return what that date is.
<?
function count_to_date($day,$month,$year)
{
$d=date(j)+$day;
$m=date(n)+$month;
$y=date(Y)+$year;
if ($d>31)
{
while ($d>31)
{
$d-=31;
$m+=1;
}
}
if ($m>12)
{
while ($m>12)
{
$m-=12;
$y+=1;
}
}
//below sets sequence: day/month/year
$r=$d.'/'.$m.'/'.$y;
return $r;
}
//below returns a future date (day/month/year)
echo count_to_date(3,0,0);
//a bit of theory
//count_to_date(number_of_days,number_of_months,number_of_years);
?>
Reputation Points: 410
Solved Threads: 258
Occupation: Genius
Offline 3,004 posts
since Sep 2007