Back to winter 2019, when we were working on the Commander plugin we needed a comparison between two tiddlers to see which is greater. See [1]
The best solution we found (by BTC) at that time was as below [2] (still works and is part of Commander)
<$set name="tidBMod" value={{{ [[Bb]get[modified]] }}}>
<$set name="tidAMod" value={{{ [[Aa]get[modified]] }}}>
<$list filter="[<tidAMod>] [<tidBMod>] +[nsort[]last[1]removesuffix<tidAMod>]">
Yes, Aa is newer
</$list>
<$list filter="[<tidAMod>] [<tidBMod>] +[nsort[]last[1]removesuffix<tidBMod>]">
No, Aa is older
</$list>
</$set>
</$set>
With the advent of many new filter operator, I want to know if there is a shorter and more semantic solution can be found today Apr 2021
I thought about the below solution and it works in TW 5.1.23
<$vars dtb={{{[[Bb]get[modified]]}}}>
<$list filter="[[Aa]get[modified]compare:integer:gt<dtb>then[Aa]else[Bb]]">
<<currentTiddler>> is newer!
</$list>
</$vars>
But I am wondering if we could use :filter or some other operator to drop the $vars and dtb and perform the comparison in single $list
Note Aa and Bb are two tiddlers