Commit:    a5612288e63edec8577743e5d9a0ed5956c990ae
Author:    Sherif Ramadan <[email protected]>         Thu, 13 Dec 2012 11:16:34 
-0500
Parents:   3d109b91788e8ad7252df4ea6716111191068eee
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=a5612288e63edec8577743e5d9a0ed5956c990ae

Log:
Fixed relTime function, wrong format specifiers in DateInterval::format were 
used.

Changed paths:
  M  include/shared-manual.inc


Diff:
diff --git a/include/shared-manual.inc b/include/shared-manual.inc
index 76bed6b..8058c4e 100644
--- a/include/shared-manual.inc
+++ b/include/shared-manual.inc
@@ -654,10 +654,10 @@ function relTime(DateTime $date) {
     $diff = $current->diff($date);
     $units = array("year" => $diff->format("%y"),
                    "month" => $diff->format("%m"),
-                   "day" => $diff->format("%m"),
-                   "hour" => $diff->format("%m"),
-                   "minute" => $diff->format("%m"),
-                   "second" => $diff->format("%m"),
+                   "day" => $diff->format("%d"),
+                   "hour" => $diff->format("%h"),
+                   "minute" => $diff->format("%i"),
+                   "second" => $diff->format("%s"),
                   );
     $out = "just now...";
     foreach ($units as $unit => $amount) {


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

Reply via email to