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 627420b..7deacd0 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 7a1c1cc..c8df8a9 100644 (file)
@@ -12,6 +12,7 @@ render(
     'display',
     array(
         'repo' => $repo,
+        'dh'   => new \Date_HumanDiff(),
     )
 );
 ?>