Open ckcollab opened 8 years ago
Yeah nice. Might expand on this idea and make use of moment.js...
Oh man, I knew there was some library that already did this better than I could :D
Yeah moment JS "Relative Time" seems perfect, is it OK to add dependencies to this project like that?
EDIT: Oh, it's already a dependency, I see... maybe I should try forking this/learning more about Node projects.
I'm thinking create a <rg-moment>
tag that essentially wraps the majority of the moment API - as far as moment dependency is concerned its fine to depend on a separate library.
Ah, sorry hit post on accident! Updating...
I just whipped this up for a personal project using RiotJS and I thought you guys might find it useful. Apologies for not taking the time to fork the repo and such, I'm normally a backend guy so it's kind of daunting. I may do just that if I get some more free time this weekend.
Usage:
<time-ago timestamp="2015-11-27T04:02:30.935205+00:00"></time-ago>
Example output:
5m ago