use Date_HumanDiff from PEAR to display changelog times
authorChristian Weiske <cweiske@cweiske.de>
Tue, 17 Apr 2012 11:48:13 +0000 (13:48 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 17 Apr 2012 11:48:13 +0000 (13:48 +0200)
data/templates/display-sidebar-history.htm
www/display.php

index 627420bdcfc35ecec2330c38128736f7c23babea..7deacd0d038b7646a2ae2ca3eff8bd9018dc955b 100644 (file)
@@ -10,7 +10,7 @@
   {% endspaceless %}
   <a class="hash" href="{{repo.getLink('commit', commit.hash)}}">{{commit.hash|slice(0, 6)}}</a>
   <img src="{{commit.getIconUrl}}" alt="{{commit.committerName}}" title="{{commit.committerName}}" width="20"/>
-  <span title="{{commit.committerTime|date('c')}}">{{commit.committerTime|date('Y-m-d')}}</span>
+  <span title="{{commit.committerTime|date('c')}}">{{dh.get(commit.committerTime)}}</span>
  </li>
 {% else %}
 <p>No commits yet</p>
index 7a1c1ccb2eb7a494a612cf58130f83b68306a465..c8df8a9963b92ef2e82da0a6d1626f659bb86010 100644 (file)
@@ -12,6 +12,7 @@ render(
     'display',
     array(
         'repo' => $repo,
+        'dh'   => new \Date_HumanDiff(),
     )
 );
 ?>