dartungar / obsidian-simple-note-review

Simple, customizable plugin for easy note review, resurfacing & repetition in Obsidian.md.
MIT License
57 stars 2 forks source link

Incorrect display of set statistical info #44

Open Ciacconinia opened 11 months ago

Ciacconinia commented 11 months ago

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 commented 11 months ago

@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 commented 11 months ago

@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 commented 11 months ago

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