Open isaackwan opened 6 years ago
Have you tried {{ (someDate | timeago).replace(' ago', '') }}
@BinaryPatrick that works, but having it built in would be nicer. I wanted to make a pipe that wraps this pipe, but ran into injector errors (not sure why), so just having this built in would alleviate that sort of issue as well.
The other issue is that going in reverse will not work correctly with the timer that is set. It assumes that timestamps only move in the forward direction.
I completely agree. Maybe it would be better to create a timeUntil pipe that mirrors timeAgo in the other direction.
I ended up using https://www.npmjs.com/package/ngx-timeago which handles both cases with one pipe (which is ideal).
Currently it shows the diff in "xxx ago" which can be confusing at times.
Cheers :)