freedomofpress/securedrop — pull request #571 by DonnchaC (2014-09-11 20:44:23+00:00)
Title: Display human readable relative times to users instead of dates

I've written some very rough code to format timestamps as human readable relative times rather than dates. From my quick review it looks to be working okay. For times older than 30 days the current implementation reverts back to displaying the full datetime.

This pull request aims to resolve #570. At the moment code (including the preexisting _jinja2_datetimeformat function) is duplicated in sources.py and journalists.py. I'm open to suggestions as to how/where I should refactor this code to improve it.