obsidian-calendar-plugin icon indicating copy to clipboard operation
obsidian-calendar-plugin copied to clipboard

Calendar not using daily notes format

Open CaseyRo opened this issue 3 years ago • 4 comments

Describe the bug

I'm using a quite standard 'daily notes' format MM-DD ddd but clicking on day in the calendar reverts back to the original.

Already tried:

  • reinstalling calendar plugin (restarting obsidian after de-install, re-install)
  • changing date formats to be extremely simple (restarting obsidian after each change)
  • disabling / enabling daily notes

Expected behavior

When clicking on a specific day in the calendar it should go to the note formatted according to the daily notes format

Screenshots

CleanShot 2021-11-30 at 12 01 15

Environment (please specify)

OS

macOS

Obsidian Version (e.g. v0.10.6)

0.12.19

CaseyRo avatar Nov 30 '21 11:11 CaseyRo

Hi @CaseyRo, the issue here is with the format itself. You've definitely made it apparent that the calendar plugin could use some better messaging when it fails to parse the date format. Really sorry about that!

There are a few implicit requirements for the date format:

  • The date needs to be unambiguous (so it needs some token for the year YYYY)
  • It only supports tokens that moment.js (the library that Obsidian uses) can parse. That list is here:

image

I'll see what I can do about improving the messaging there so it doesn't fail silently. I also have some ideas around making the date format a bit more flexible.

liamcain avatar Dec 21 '21 16:12 liamcain

@liamcain thanks for your response! To turn this 'bug report' into a feature request, my use cases here:

  • use year/month/date for sorting files into folders, doesn't seem to work currently (using YYYY/MM/DD as format)
  • we use calendar weeks quite a lot in our company, and I like to order it in the same way, moment.js offers ww or WW in their documentation, when using moment.format. The same principle to order documents in week folders would then be my next wish ;-)

Thanks for catching up over Christmas! Happy holidays!

CaseyRo avatar Dec 26 '21 16:12 CaseyRo

@liamcain - I have a related request, if it's possible: could Calendar ignore any text appended to a filename after the parseable date format?

Use case -- I often add text to a daily note filename to make it easier to skim for the major points of that day:

  • day 2021-12-23 Nextcloud add-ons
  • day 2021-12-22 Teamwork import of Trello board fail
  • day 2021-11-23 Mailchimp, link in bio, WP image captions

Calendar picks up my daily notes just fine, until I append any text to the filename.

Is this a technical possibility? Or should I just be reconsidering my method?

toddz262 avatar Jan 05 '22 23:01 toddz262

Yes, please allow to add any text after the date format.

Another way to put it is: please allow a filename format like YYYY-MM-DD *

fplanque avatar May 29 '22 21:05 fplanque