Skip to content

Weekly notes are created 1 week behind. *fixed* #388

Open
@4sherlul

Description

@4sherlul

Describe the bug

When I tried to create a weekly note from the calendar it would instead try to create a note for the previous week, resulting in an error. I had a similar and related issue with the periodic notes plugin not recognizing Sunday as the first day of the week, but I have already resolved that as described in my other posts. I mention this because fixing the other error inspired me with this solution.

Steps to reproduce

set your weekly notes to begin on sunday in periodic notes and calendar. Try to create a weekly note from the calendar; it should prompt you to create a note for the previous week. Clicking yes to creating the note will create a note for the previous week, if one is already created it will result in an error.

Expected behavior

It should create a weekly note for the week you actually clicked on.

Environment (please specify)

OS

Windows 11

Obsidian Version (e.g. v0.10.6)

v1.8.10

Solution

The solution for me was a 2 step process.

  1. fix perodic notes not recognizing sunday as the first day of the week, resulting in weekly note errors. For me I had to switch "YYYY-[W]W" for my weekly filename format to -> "YYYY-[W]w". This is because in the syntax, lowercase w's will get your locale settings instead of the default ISO settings.
  2. After that is dealt with, you now need to modify the main.js file for your calendar plugin. Now search for "gggg-[W]ww" in the main.js file. Replace all instances of that with the format you created in step 1.

Now your calendar should create the correct weekly notes.

For me this was broken for weeks and I couldn't find any solutions anywhere. Hope this helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions