I read about registering my own handlebars helper to display the date format I want. I read too that I could use a new transform type to use on my model. However, the examples in the docs are so simple that it doesn't help me.
When I call my model's property in my handlebars (for examples {{message.created_at}} where created_at is the above date)
2015-02-12T19:00:00.000-05:00 (february 12th for information)
How can I display this date with a time ago stamp? For example, if I sent the message at 9:00 am and it is 9:05, I want to display 5 minutes ago.
Aucun commentaire:
Enregistrer un commentaire