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

Allow user-defined functions for date_format, that returns a string. #740

Open
Oneechan69 opened this issue Oct 6, 2024 · 0 comments
Open

Comments

@Oneechan69
Copy link

Oneechan69 commented Oct 6, 2024

🚀 The feature, motivation and pitch

Right now the daily_notes date_format option only accepts a lua date and time string https://www.lua.org/pil/22.1.html, which doesn't allow all the formatting options that Obsidian does for daily notes, like single digit days of the month (3 instead of 03) and ordinals (3rd), making creating daily notes for my vault impractical with Obsidian.nvim.

A potential solution for this is if the user could define a function which accepts a date argument indicating the date they want to create the daily note for, and the function returns a string. When the user wants to create a daily note like with the :ObsidainToday command, the name of the daily note is the string (without the .md extension, Obsidian.nvim should add that itself). A function call with date could be declared under date_format.

Alternatives

No response

Additional context

No response

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

No branches or pull requests

1 participant