where is the module outputing the things such as"ahout 6 hours ago"
-
As I can see within the lavender-themes js-file it's a plugin of jQuery: create a span with title like
2014-02-19T18:44:26.045Z
(utils.toISOString(post.lastposttime)
), select it with jQuery and call$('yourSpan').timeago()
Source: here
Within templates I guess you just need to give the span the correct title and class
timeago
like herePS: not tested anything
-
Yep. We use timeago, except for the notifications dropdown, which is still our own hand-rolled string, which really ought to be replaced at some point.
Just call $(parentElement).timeago() to initialise. The ISO string should be in the title, as @frissdiegurke says.
-
which is still our own hand-rolled string
I actually didn't realize this. I happened to hand-roll my own fn for pewter (see this)
maybe make it publically available so I can just call that instead. whichever of our two functions that's better
-
@psychobunny Notifications are still using the old utils.js relativeTime method