-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative time on admin page is wrong #204
Comments
Maybe it just means "last month", which would be correct looking at the February date from March? |
Yup, I would agree - the wording should probably say "Last month" instead then though. I'd argue that counting days is better since "Last month" leaves me not knowing at a glance whether it was 6 days ago or 30 days ago. |
Without having taken a deep-dive in the code, I think the issue comes from the use of "selectUnit". Notice the "Caveats" listed here: https://www.npmjs.com/package/@formatjs/intl-utils#caveats (Also notice that the package is deprecated and selectUnit has been removed from the updated package) |
It seems the logic surrounding the relative times for the "Created" and "Last used" column is wrong.
![image](https://private-user-images.githubusercontent.com/109624469/310100527-0ce7de3a-da2d-45f2-aad3-8c94e756df9e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg1MTc3MzQsIm5iZiI6MTcxODUxNzQzNCwicGF0aCI6Ii8xMDk2MjQ0NjkvMzEwMTAwNTI3LTBjZTdkZTNhLWRhMmQtNDVmMi1hYWQzLThjOTRlNzU2ZGY5ZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxNlQwNTU3MTRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wYWU0MGM2NTY1OTEyYjg5NjFkMzBmYWE0ZmU0ZWMzMDFmZWEyOGIyMWNiNmY3NDllMTY3MTFlYzI1NTU1MDg4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.bgUhBHRKMqNKX--w4yGQkeTgDkTpEy-Xvb0YbXCYdGs)
In the screenshot above taken today (2024-03-05), notice that it says "1 month ago". Hovering the mouse over the relative time reveals that it was in fact only on 2024-02-29, i.e. less than a week ago
The text was updated successfully, but these errors were encountered: