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

Incorrect display of set statistical info #44

Open
Ciacconinia opened this issue Oct 4, 2023 · 3 comments
Open

Incorrect display of set statistical info #44

Ciacconinia opened this issue Oct 4, 2023 · 3 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Ciacconinia
Copy link

I got incorrect set stats info that the number of notes reviewed in last 7 & 30 days are zero. I think it might be related to the type of property "reviewed" because that is the only thing I changed. The language of my operating system is chinese and the default type of "reviewed" in my computer is text. I prefer date type so I made the change.

Anyway, it is just my guess and I do find the plugin very useful for reviewing notes, so I hope it can be fixed soon :)

@dartungar
Copy link
Owner

@Ciacconinia sometimes stats are resetting; can you try to hit "refresh" button on the sidebar (the 🔃) the next time you encounter the bug, and see if that helps?
image

@Ciacconinia
Copy link
Author

@Ciacconinia sometimes stats are resetting; can you try to hit "refresh" button on the sidebar (the 🔃) the next time you encounter the bug, and see if that helps? image

Thanks. I tried to hit the "refresh" button but it didn't help. By the way, I found that the field value of "reviewed" in my notes is like "2023年-01月-01日". If I manually changed it to "2023-01-01", the set info becomes correct. So, I changed the code in the function getTodayAsYyyyMmDd in main.js, e.g., from 'const year = date.toLocaleString("default", { year: "numeric" });' to 'const year = date.toLocaleString("en", { year: "numeric" });', and it works.

So, I guess the issue is more related to the string format of the field value of the property "reviewed". My current solution is not that smart and perhaps the issue can be fixed.

@dartungar dartungar self-assigned this Oct 12, 2023
@dartungar dartungar added the bug Something isn't working label Oct 12, 2023
@dartungar
Copy link
Owner

@Ciacconinia I will try to look into it when I have some time on my hands. Localization always is a pain 😅

@dartungar dartungar added the help wanted Extra attention is needed label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants