liamcain / obsidian-daily-notes-interface

Package to create, open, and find daily notes from your Obsidian plugin
MIT License
84 stars 10 forks source link

Daily notes do not account for year #31

Closed localjo closed 5 months ago

localjo commented 6 months ago

This bug has been reported in the calendar plugin:

https://github.com/liamcain/obsidian-calendar-plugin/issues/351

But the source of the bug is actually this interface. It seems that this interface is returning notes with the correct date but wrong year.

localjo commented 5 months ago

Update: it looks like this problem is actually because the getDateFromFile function is using the basename instead of the full file path to get the date

https://github.com/liamcain/obsidian-daily-notes-interface/blob/main/src/parse.ts#L51

But in the Daily Notes plugin, I am using the date format YYYY/MM/DD to organize my notes into folders by year and month, so the basename doesn't contain the year.

localjo commented 5 months ago

Looks like this is a duplicate of https://github.com/liamcain/obsidian-daily-notes-interface/issues/21