note 83594 deleted from function.time by nlopess

From: Date: Mon, 09 Jun 2008 19:27:50 +0000
Subject: note 83594 deleted from function.time by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-140284@lists.php.net to get a copy of this message
Note Submitter: binh.name ---- Dude: function get_formatted_timediff($then, $now = false) { $now = (!$now) ? time() : $now; $timediff = ($now - $then); Why did you take $now - $then??? I put a future time and it appear to be "minus" time and with "ago"... Later on I found out that you used $now - $then The correct would be $then - $now. Regards, Binh Nguyen http://binh.name http://apmart.com

« previous php.notes (#140284) next »