Skip to content
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

Open
jvmdc opened this issue Mar 5, 2024 · 3 comments
Open

Relative time on admin page is wrong #204

jvmdc opened this issue Mar 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@jvmdc
Copy link
Contributor

jvmdc commented Mar 5, 2024

It seems the logic surrounding the relative times for the "Created" and "Last used" column is wrong.
image
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

@bkimminich
Copy link
Member

Maybe it just means "last month", which would be correct looking at the February date from March?

@jvmdc
Copy link
Contributor Author

jvmdc commented Mar 5, 2024

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.

@jvmdc
Copy link
Contributor Author

jvmdc commented Mar 5, 2024

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)

@J12934 J12934 added the bug Something isn't working label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants