gitweb: refactor age_string computation
commit03d052da5001caeb6427b08feebdd35dba8cfe06
authorKyle J. McKay <mackyle@gmail.com>
Wed, 22 Apr 2015 19:15:11 +0000 (22 12:15 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Wed, 22 Apr 2015 19:15:11 +0000 (22 12:15 -0700)
tree1c524106ec35d71c25ab0113441c5e5e81ee931f
parentf9f5fb9e3b79c8e4e76c3cf3d0650cf8749652ea
gitweb: refactor age_string computation

To facilitate caching, the age_string function needs to take
as its arguments not the actual age in seconds, but the
actual unix epoch creation time and the unix epoch to compute
the age string against (which defaults to now) instead.

To get the old behavior, passing in 0 for the first argument
and the age in seconds as the second will suffice.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
gitweb/gitweb.perl