Hacker News new | ask | show | jobs
by verisimilitude 5041 days ago
Here's what I do. First, the markup: <time datetime="2011-08-27T19:1­5:38Z" pubdate>27 Aug, 2011</time> So, time in [ISO 8601][0] format. Run JS to transform '27 Aug, 2011' into a relative date. If the relative date is >1 month (or, whatever you'd like), then just display the full date.

[0]: http://en.wikipedia.org/wiki/ISO_8601

2 comments

Ding ding ding. Machine readable and user-friendly.

If you're making your users' experience worse out of a fear of breaking the relative value of screenshots you might need to re-examine your priorities.

And cacheable too.
If it stops one long-since-debunked urban legend from being propagated via a screenshot of an old, relative-dated post, it's probably worthwhile.
This would even let users change the date back with a user script.

A browser/extensions could add a tooltip or context menu item to time elements, showing relative and absolute dates regardless of the way it's authored.