I have tiddlers whose titles are simply a year (e.g., “2020”). I created the following macro to calculate the age based off the title. For example, the macro below should return “20” on the “2020” page. (that is, 2020-2000=20):
\define showAge() {{{ [<currentTiddler>subtract[2000]] }}}
It works great locally, but why doesn’t this work as a global macro? I have tagged the global macro with $:/tags/Macro
.
My ultimate goal is to be able to change the 2000 to an arbitrary field, but I first want to understand this basic step. From there, how would I take, for example, the “born” field from say a tiddler [[Person A]] and plug it into the “[2000]” spot?
Your insights are kindly appreciated.
MR