[PHP] Date Stuff...

2002-08-02 Thread Brian McGarvie

Given a date how would you work out number of months elapsed between
DateInPast and DateNow?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Date Stuff...

2002-08-02 Thread Stas Maximov

(YearsDifference*12)+FullMonthsDifference :)

Regards, Stas.

- Original Message - 
From: Brian McGarvie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 02, 2002 1:50 PM
Subject: [PHP] Date Stuff...


 Given a date how would you work out number of months elapsed between
 DateInPast and DateNow?
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Date Stuff...

2002-08-02 Thread Chris Boget

 Given a date how would you work out number of months elapsed
 between DateInPast and DateNow?

( $monthTo - $monthFrom ) + (( $yearTo - $yearFrom ) * 12 )

I believe that's the correct equation for figuring out the number of months.

Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php