mo-seph / obsidian-note-from-template

Simple plugin to create Notes from a template, and fill in fields defined there
MIT License
108 stars 9 forks source link

[Feature Request] template-filename YAML: Support for Date Format Syntax #15

Closed FelipeRearden closed 2 years ago

FelipeRearden commented 2 years ago

Hello @mo-seph !!!!!

Would be great to have support for date format syntax the same way that we have with obsidian core plugin Template

{{date}} {{time}} {{date:YYYY-MM-DD}} {{time:HH:mm}}

My Workflow: Journals

I have note journals for different purposes: Dream Journal, Gratitude Journal and Anger Journal Each one of then have is own template, filename and folder.

I have one note for day for these three journals

For example: Anger Journal

If we have a new date format syntax I could create an YAML like this to my daily anger journal template

---
template-output: Anger_Journal
template-filename: AN_{{date}}
tags: [Journal/Anger]
---

{{Question1:area}}

{{Question2:area}}

{{Question3:area}}

Thanks for reading this :)

Have a great day!

mo-seph commented 2 years ago

See the new currentdate field type, e.g. {{now:currentdate:dd-MM-yyyy}}. Format elements are from https://moment.github.io/luxon/#/formatting. It should cover both date and time by using different formats.

FelipeRearden commented 2 years ago

Hello @mo-seph !!!!

Thank you very much !!!!!

Working perfect on version 0.1.8 Obsidian 0.12.19

I wish you a fantastic day !