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

Could we have something like Dataview’s this.file.day? #328

Open
Moonbase59 opened this issue Aug 14, 2021 · 0 comments
Open

Could we have something like Dataview’s this.file.day? #328

Moonbase59 opened this issue Aug 14, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Moonbase59
Copy link

Moonbase59 commented Aug 14, 2021

Is your feature request related to a problem? Please describe.
Dataview has this.file.day, which returns a date if …

  • something "looking like a date" (must not be in YYYY-MM-DD format) is found in the file’s title, or
  • a date: YAML frontmatter variable has been set

and undefined (in the form of a settable text replacement like -) otherwise.

This is extremely convenient, since one doesn’t have to fiddle with separating dates out of oddly-formatted file names, or can use YAML date: as a (preferred) equivalent.

Describe the solution you'd like
A similar file variable in Templater, that uses the same rules. If it was too much to set an undefined replacement text in settings, it might have an additional, optional parameter that provides that (having a good default).

Describe alternatives you've considered
Tried to somehow intermix Dataview and Templater to achieve same result, but that’s too complicated. Also, requiring two instead of one plugin isn’t always optimal.

Additional context

@Moonbase59 Moonbase59 added the enhancement New feature or request label Aug 14, 2021
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

2 participants