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

Support for Day-of-Year Format (DDDD) as unique daily note filenames #244

Open
andrewfantastic opened this issue Dec 30, 2024 · 0 comments

Comments

@andrewfantastic
Copy link

Feature Request: Support for Day-of-Year Format (DDDD) as unique daily note filenames

Description:
Add support for day-of-year format (DDDD) in daily note filenames. This format is useful for creating unique filenames using the day of the year (1-365/366).

Current Behavior:
Currently, trying to use a format like "YYYY-DDDD" results in a "Filename must be unique" error, even though this format would create unique filenames.

Proposed Solution:
I've implemented and tested a fix locally that adds support for DDDD format in validation.js. The change modifies the validation logic to accept formats that use DDDD (day of year) combined with YYYY (year) as valid formats for daily notes.

Testing:
I've tested this with the format I'd like to use:

  • "YYYY-DDDD"
    And confirmed that it properly validates and creates unique filenames.

Let me know if you'd like me to submit this as a pull request - however, I also noticed that the production version and the latest from github don't seem to behave exactly the same way; notably the current from github doesn't seem to validate any filename formats that don't have any path separator "/", whereas the production plugin does. So there may be intricacies I don't know enough about, such as the combined behavior with the Calendar plugin, etc.

Thanks for the great plugins!

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

1 participant