Open zenodotus280 opened 3 years ago
For what it's worth… this happens to me when I change my file format from gggg-[W]ww
to gggg-[W]WW
. I was trying to fix the off by one (ala #41) and this creates the year issue… the week number is now correct, but it's a year behind.
🤷♂️
Huh. Calendaring always seems peculiarly challenging in computers. Thanks for the heads up on this one, I'll be careful of I change my format.
On Tue., Aug. 24, 2021, 13:01 Evan Travers, @.***> wrote:
For what it's worth… this happens to me when I change my file format from gggg-[W]ww to gggg-[W]WW. I was trying to fix the off by one (ala #41 https://github.com/liamcain/obsidian-periodic-notes/issues/41) and this creates the year issue… the week number is now correct, but it's a year behind.
🤷♂️
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/liamcain/obsidian-periodic-notes/issues/56#issuecomment-904934775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4E47T7W533X3VESRUKVCLT6P3BZANCNFSM45VQV46Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
I saw the issue as well when using the format gggg-[W]WW
.
It seems to be an issue with the underlying moment library. moment('2020-34', 'gggg-WW', false)
is parsed to Mon Aug 23 2021
for some reason.
My solution is to use the file format GGGG-[W]WW
instead. That seems to be parsed correctly and the correct note gets opened. There is a warning at http://sahatyalkabov.com/jsrecipes/#!/backend/formatting-dates that says:
w, ww Week of the year (NOTE: combine this format with "gg" or "gggg" instead of "YY" or "YYYY")
W, WW Week of the year (NOTE: combine this format with "GG" or "GGGG" instead of "YY" or "YYYY")
@urdvr thanks for this! I get the following…
that looks perfect… but when I run the command to open a weekly note:
I get an error about the previous week. 🤷
I have switched from gggg-[W]WW to GGGG and it is resolved for me as well. @evantravers, is Obsidian and the plugin updated?
As far as I know… fully updated. If it helps, I'm trying to use Sunday as start of the week… it's how my computer is set. When I install the calendar plugin, it ignores the automatic and manual setting and has the wrong week number.
https://github.com/liamcain/obsidian-calendar-plugin/issues/183#issuecomment-870514913
I'm all kinds of messed up. :P
I was using the same Weekly title format before this plugin came along and now weekly notes from last year are already populated in September until the end of December. Not sure how I'll fix this but open to suggestions.