[BUG] Dates in Filename not parsed
See original GitHub issueDescribe the bug Using Capture To I’m trying to log the current file to my Daily Note. My date format does show up properly in settings for QuickAdd but it doesn’t actually parse into a date. Instead it shows up in my Daily notes as {{YYYY-MM-DD}} and the note I’m trying to log does not get logged into the file either.
Console error:
QuickAdd: (LOG) TemplaterError: Invalid reference date format, try specifying one with the argument 'reference_format' VM133:15096
Setup of Capture To:
![Screen Shot 2021-10-13 at 7 12 41 AM](https://user-images.githubusercontent.com/74561/137150372-f4bf3f02-4818-47db-a1f6-6d917e4978f0.png)
To Reproduce Steps to reproduce the behavior:
- Setup Quick Add as described
- Run Action
- See file created but not with proper date format and not with link to the file I was currently active in
- See error
Expected behavior I expect that Quick Add will create the file if it doesn’t exist and then log the link to the current file after the Reading heading.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: macOS, iPadOS 15
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: M1 iPad Pro
- OS: 15.0.1
- Browser Stock Safari
- Version latest
Additional context Templater also shows an error at the same time, but that may be because it’s looking at the file name to get the date it wants to parse into the variables and {{YYYY-MM-DD}} isn’t a valid date.
![Screen Shot 2021-10-13 at 7 01 48 AM](https://user-images.githubusercontent.com/74561/137150840-75664861-2523-4f46-ad47-7027887316fb.png)
Possibly Related:
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
I’m not seeing these problems now after a few days of testing so…gremlins I guess.
Agreed, it could very well be the template. I tried to recreate it with no template, and it’s working as intended. This is potentially what’s happening: the file is created, but the Templater cannot parse the Templater code, so it fails. This exception immediately stops the QuickAdd creation process as well, so nothing is captured.
It looks like Templater is complaining about a reference date format. Here’s some more information about that: https://silentvoid13.github.io/Templater/docs/internal-variables-functions/internal-modules/date-module