Hi Saq,

Very clever! Both works!

On Wed, May 5, 2021 at 11:08 AM Saq Imtiaz <[email protected]> wrote:

> Does this do what you need?
>
> Aa Bb +[nsort[modified]limit[1]]
>
>
I am wondering why we did not try this which was available from 2015? ;-)



> Or try something like this in 5.1.24 pre-release:
>
> Aa Bb :sort:date[get[modified]] +[limit[1]]
>

Great! So, we can use the new named prefix :sort?
Is it possible to have multiple steps filter like below

filter1 :filter[step2]  :filter[step3]





>
>
> See https://tiddlywiki.com/prerelease/#Sort%20Filter%20Run%20Prefix
> On Wednesday, May 5, 2021 at 7:41:37 AM UTC+2 Mohammad wrote:
>
>> 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
>>
>>
>>
>> Best wishes
>> Mohammad
>>
>> [1] https://groups.google.com/g/tiddlywiki/c/9QQvkJkLogA/m/3AGSBBJKBgAJ
>> [2] https://groups.google.com/g/tiddlywiki/c/9QQvkJkLogA/m/UbIgaSFSBgAJ
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/918a183b-82d2-411e-8896-06315800770bn%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/918a183b-82d2-411e-8896-06315800770bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMCkyv%3DW03nw2-zLtru0hjFi2KJd8jiRfGSfSJH6dC3sSA%40mail.gmail.com.

Reply via email to