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

2025 Jan/Feb command palette "Periodic Notes: Open weekly note" creates and/or opens prior week's note e.g. (WW-1) instead of WW #248

Open
Fitzgibberish opened this issue Feb 5, 2025 · 1 comment

Comments

@Fitzgibberish
Copy link

Jan 2025, workweeks 4 and 5 tested and having issues.

Periodic notes Weekly notes settings using Format: YYYY-[w]WW.
On Weds 5 Feb 2025 the syntax reference says that "Your current syntax looks like this: 2025-w06
and on Fri, 31 Jan 2025, the syntax reference said that "Your current syntax looks like this: 2025-w05

However, using the command palette command "Periodic Notes: Open weekly note" opens and/or creates the prior week's note, e.g. (WW-1) instead of WW

Tested:
using this command on Friday, January 31st 2025 resulted in the Note '2025-w04' being created and opened when it should have been 2025-w05

Using this command today (Weds, 5 Feb 2025) resulted in the note '2025-w05' being created and/or opened when it should be 2025-w06

My daily notes template has a link to a section in my weekly goals note (link is below),
![[Goals/{{date:YYYY-[w]WW}}#Weekly Goals]]
but since the palette command is a week behind, I can't actually get the correct note generated, and my links do not work.

(the problem is not the link to the Goals folder - the palette command creates notes in the Goals folder - so it appears to be an issue with the palette command subtracting 1 from WW).

@endic-sam928281
Copy link

Hello, we tried to solve the issue.

This is what we did:

Modified the code to correctly calculate and create weekly notes based on the current date. The main changes were made in the src/utils.ts file to ensure the correct week number is used when creating or opening weekly notes.

You can review changes in this commit: endic-sam928281@13843fc.

Caution

Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.


Latta AI seeks to solve problems in open source projects as part of its mission to support developers around the world. Learn more about our mission at https://latta.ai/ourmission . If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants