What is the best way to format time like modern web-pages (including StackOverflow ;-) do, i.e. using simple relative descriptions like:
- 5 seconds ago
- 23 minutes ago
- yesterday
- 2 days ago
- ...
I am looking for a library that can handle this in addition to multiple locales. I can supply the phrases ( "X seconds" in English, "X Sekunden" in German etc.).