Hello all,
I am using Angular Moment to format dates into time ago. Instead of displaying ‘42 minutes ago’, I would like to display ‘42m’. It is working in the browser just fine, but within my app the times revert back to the original ‘42 minutes ago’ Markup:
<div class="col col-20 red post-date" am-time-ago="topic.post_stream.posts[0].updated_at"></div>
Inside .run()
in app.js
I am setting the locale to handle this described here. Relevant code.
moment.lang('en', {
relativeTime : {
future: "in %s",
past: "%s ago",
s: "%ds",
m: "1m",
mm: "%dm",
h: "1h",
hh: "%dh",
d: "1d",
dd: "%dd",
M: "1m",
MM: "%dm",
y: "1y",
yy: "%dy"
}
});
Thanks.