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

File last modified date #131

Closed
ih8snow opened this issue Apr 21, 2021 · 4 comments
Closed

File last modified date #131

ih8snow opened this issue Apr 21, 2021 · 4 comments

Comments

@ih8snow
Copy link

ih8snow commented Apr 21, 2021

Hi,

when I use <% tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %>
is this only a "one-time" read of the date or is there any update when I reopen the file?

In my vault I see only a new date when I insert a new template in this file".

When I save the file some minutes later, this date/time is till the same.

Thanks for your help!

Jörn

@SilentVoid13
Copy link
Owner

Hey @ih8snow this is a one time read, the command just gets replaced and that's it.
That being said, I'm working on "dynamic" templates that would get triggered when entering preview mode (not in editing mode).
Could that be what you're looking for ?

@ih8snow
Copy link
Author

ih8snow commented Apr 21, 2021

Hi,

yes, dynamic would be cool. I would use it in the metadata of the notes where I collect tags, linked topic.
So creation date and modified date would be a nice fit to that.

@SilentVoid13
Copy link
Owner

Hey @ih8snow, you can now use Dynamic commands.

In your use case, this would give:

<%+ tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %>

Documentation at https://silentvoid13.github.io/Templater/docs/commands/dynamic-command

@mrienstra
Copy link

New doc URL: https://silentvoid13.github.io/Templater/commands/dynamic-command

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

3 participants