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

Using a template to get a timestamp gives an error #44

Closed
3 tasks done
ltctceplrm opened this issue Aug 20, 2022 · 6 comments
Closed
3 tasks done

Using a template to get a timestamp gives an error #44

ltctceplrm opened this issue Aug 20, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@ltctceplrm
Copy link
Contributor

ltctceplrm commented Aug 20, 2022

  • The Plugin is up to date
  • Obsidian is up to date

Describe the bug
When I try to timestamp the new media entries using the templates they give an error instead of the timestamp.

To Reproduce
Steps to reproduce the behavior:

  1. Have this this template for movies created: {{ date:YYYY-MM-DDTHH:mm:ssZ }}
  2. Add a new media DB movie entry
  3. See error

created:
"{ INVALID TEMPLATE TAG }": null

Expected behavior
For regular notes this template works fine and it should post the timestamp like this:

created: 2022-08-20T23:46:58+02:00

Occurs on

  • Windows

Plugin version
0.3.1

Additional context
I've also tried the following templates with little success:
created: {{ date }}

created:
"{ INVALID TEMPLATE TAG - object undefined }": null

Or

created: {{date:YYYY-MM-DDTHH:mm:ssZ}} , created: {{ date : YYYY-MM-DDTHH:mm:ssZ }}

I'm not sure if it is a bug though or if I'm just doing something wrong

@ltctceplrm ltctceplrm added the bug Something isn't working label Aug 20, 2022
@ltctceplrm
Copy link
Contributor Author

If I use the Templater plugin to add the timestamp with <% tp.date.now("YYYY-MM-DD[T]HH:mm:ssZ") %> instead of using the Obsidian template then it actually works, weird

@mProjectsCode
Copy link
Owner

it is probably because of the extra : in there

@ltctceplrm
Copy link
Contributor Author

Oh, which : should I remove to have it work with the default template?

@mProjectsCode
Copy link
Owner

try removing the ones in the date template

@mProjectsCode
Copy link
Owner

nvm, the way you are trying to use the themplates is not implemented yet

@ltctceplrm
Copy link
Contributor Author

Oh okay, I'll continue using templater in the meantime since then the timestamp does work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants