This is not an issue. When used in a filter, the macro parameter values are parsed separately from the filter syntax in which the macro occurs. Thus, square brackets that are within the value of a macro parameter DO work:
Yet, there is a problem when you don’t know what format to apply. Say you wants the new Journal tiddler format (stored in $:/config/NewJournal/Title). How would you do that in a filter?
“short-syntax” macros (using <<macroname ...>>) don’t permit transclusion of parameter values, so something like this:
<<now {{$:/config/NewJournal/Title}}>>
won’t work, regardless of whether it is in a filter, or just occurs in regular wikitext. Of course, within wikitext, you can always use the full $macrocall widget syntax, which DOES allow transclusion of parameter values, like this:
Unfortunately, you can’t invoke widgets from within filter syntax. However, when using filter syntax there is another way to apply a transcluded datetime format, like this:
@EricShulman{{{ [<now YYYY0MM0DD0hh0mm0ss0XXX>format:date{$:/config/NewJournal/Title}] }}} only works because you have a fixed format. You can’t replace YYYY0MM0DD0hh0mm0ss0XXX by the content of a variable.
If you return to my solution using functions, they have the advantage of being evaluated and all you need to know is how to express something as a filter.
So for example in a function definition [{$:/config/NewJournal/Title}] will return the content of that tiddlers text field and your format. However you may as well as combine it with your use of now like eric’s format.
Notice how I named the function in general terms, I would consider using this in all my wikis as a global definition, keeping in mind it is always up to date.
I use display. to indicate functions designed for display output rather than subsequent calculations. In this case because the output may be hard to parse depending on the format.
If you want to use this function in wikitext <<display.today>> you may want to add +[join[]] at the end.
@EricShulman Thank you. I had had the same idea and made it work too. but this solution has the defect of having let/wikify/let instead of a single let. A bit unconvenient and ugly, but it wosks!