Dynamic #tag arguments inside template

Hey Agenders,

I’ve been struggling for a while with search and navigation and desparately wanted to something like this

referencing particular note via tag
#reference(standup-\now(format: yyyyMMddHHmmss))

put creation date into notes template
#created(\date)

As you can imagine it doesn’t work

BUT

I’ve found an elegant solution, but it works only for date,time,now actions so far

http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Field_Symbol_Table
According to this lengthy specification there a way of escaping characters used in date format.

so here is a solution

\date(format: '#created('yyyy-MM-dd'))

\now(format: '#reference(standup-'yyyyMMddHHmmss'))

and result

So the idea is to have tag defined inside date format. Keep in mind you need to reset format according to documentation.

1 Like

Smart thinking and a great and elegant solution! Thanks for sharing!

1 Like