“5 days ago” I implemented a “live update” for relative timestamps. Well as you all might understand, the “5 days ago” might need updating tomorrow.
Now what I found very annoying is, that when you just uploaded a file, it shows “seconds ago”. But if you now leave the browser window open for some time, it will still say “seconds ago”, although it might be hours ago already.
So I implemented a update mechanism for such things. I made the thing very general, so apps can use it aswell. Requirements:
- Object has class
- Milliseconds timestamp is in attribute
- Then the
text()of the object is updated every 30 seconds.
Would be nice, if you check your app for relative dates and in case you have one, update it as well.