You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
I need display a datetime in the format "fromNow()" of moment returned, and a filter would be useful since I'm using it within ui-grid, not likely easy to embed directive into the cell, but filter is supported and easy to use.
The text was updated successfully, but these errors were encountered:
amTimeAgo does indeed work with future dates, but daysAgo is calculated as a negative value.
So if you want to show a full date past the amFullDateThreshold, daysAgo >= fullDateThreshold will always evaluate to false and will show "a month", "a year", etc. instead of the full date.
Simple hack: var showFullDate = fullDateThreshold && Math.abs(daysAgo) >= fullDateThreshold;
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Or a more generic filter as https://libraries.io/github/dotSlashLu/moment-filter did?
I need display a datetime in the format "fromNow()" of moment returned, and a filter would be useful since I'm using it within ui-grid, not likely easy to embed directive into the cell, but filter is supported and easy to use.
The text was updated successfully, but these errors were encountered: