Just subtract the Unix timestamps.
ie. $past_date = mktime(12,45,0,5,6,1994);
$diff = time() - $past_date;
$days = $diff/86400; // number of seconds in a day
echo (int)$days; // truncate to an integer
-Rasmus
On 12 Jan 2001, Matthew Brealey wrote:
> I need to find the num
I need to find the number of days between a date in the past and todays date. Does PHP
have a function to do this, or do I need to write my own?
-- Random (non-anti-Microsoft) fortune
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional c
2 matches
Mail list logo