Ah, I didn't realise you wanted loads of days instead of splitting it into months.
The thing with the "math" version is that it doesn't deal with leap-years, so if you've got anything over 365 days, it may become slightly inaccurate, depends how accurate you want it to be.
If you want it really accurate, work it out like I said, then from the current month, work out which months have been counted, if its September, and you've got 3 months, then thats June, July and August, so thats 30+31+31 = 92 days 😃
Required more work, but for dates that are over 365 days it'll make it more accurate, as each year actually have 365.24999 or something days, its meant to be 365.25, but due to the occasional 4th year not being a leap year its actually slightly less, trust me, I've tried writing my own date statment and its not easy to get it right.
As I said, really depends if the odd 6 hours matters.
Edit - Forgot something again, obviously if your doing it the really accurate way and you have to count February, you need to know if its got 28 or 29 days, I don't know the foolproof way, but for 99% of years, if its divisble by 4, its a leap year, so use mod on it:
<?
function leapyear ($year)
{
if ($year%4=='0')
{
return $year." is a leap year";
}
else
{
return $year." is not a leap year";
}
}
echo leapyear(1997);
echo "<br>".leapyear(2000);
?>
Effect of this code at http://www.eliteguard.co.uk/test3.php