= $current_mon_max)
{
$day_diff = $day_diff - $current_mon_max;
$mon_diff = $mon_diff + 1;
}
// handle overflow of years
if ($mon_diff >= 12)
{
$mon_diff = $mon_diff - 12;
$yr_diff = $yr_diff + 1;
}
// the results are here:
// $yr_diff --> the years between the two dates
// $mon_diff --> the month between the two dates
// $day_diff --> the days between the two dates
// ****************************************************************************
// simple output of the results
print "Here comes Washington...";
print "
";
// this is just to make it look nicer
$years = "years";
$months = "months";
$days = "days";
if ($yr_diff == "1") $years = "year";
if ($mon_diff == "1") $months = "month";
if ($day_diff == "1") $days = "day";
// here we go
print "";
print $yr_diff." ".$years.", ";
print $mon_diff." $months and ";
print $day_diff." ".$days;
print "";
?>