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

[FR] Custom Date Format #94

Closed
1 task done
FeiyouG opened this issue Feb 18, 2022 · 4 comments
Closed
1 task done

[FR] Custom Date Format #94

FeiyouG opened this issue Feb 18, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@FeiyouG
Copy link

FeiyouG commented Feb 18, 2022

Please confirm

  • I am running the latest version of this plugin

Is your feature request related to a problem? Please describe.
I think it will be nice to allow the users to specify date format. For example, I prefer to have timestamp in this format: 20220217.

Describe alternatives you've considered
Or at least provide template for {{month}}, {{dayOfMonth}} so we can customize the date format ourselves.

@FeiyouG FeiyouG added the enhancement New feature or request label Feb 18, 2022
@FeiyouG FeiyouG changed the title [FR] [FR] Custom Date Format Feb 19, 2022
@lambtho12
Copy link
Member

I think it is not that straightforward...

Both ideas need to be implemented I beleive, simply adding {{month}} will only output the current month. But then what happen when you want to template other dates than the current one?

So we should have a config for the datetime_format (default would be YYYY-mm-dd)
AND we could have templates to get the current day {{now_day}}, month {{now_month}} or year {{now_year}} alone.

@sebastianbock17
Copy link

sebastianbock17 commented Mar 6, 2022

I definitely would like to find a way for setting up custom templates, especially quarter and monthly notes, I like your suggestions @lambtho12!

@lambtho12
Copy link
Member

lambtho12 commented Mar 6, 2022

I think that it would be nice to completely separate the template stuff in a separate file (already discussed here). This might facilitate PRs and community improvements. People have lots of interesting ideas, often quite simple to implement (like {{now_month}}, {{last_month}}, {{next_month}}, {{timezone}}).

In my opinion when it comes to templates and snippets like that, the more we have, the better. We could also have stuff not directly related to time, such as {{filename}}, {{pwd}}, {{dir}}, {{host}}, {{user}}, {{some git stuff?}}...

@lambtho12
Copy link
Member

Closing this as it is now possible to use {{year}}{{month}}{{day}} in the templates. So by combining all these as you wish, any date format should be possible.

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

No branches or pull requests

4 participants