On Wed, May 5, 2021 at 2:35 PM TW Tones <[email protected]> wrote:

> Or this;
>
> <$list filter="[[ActionDeleteTiddlerWidget]] [[ActionListopsWidget]]
> +[!sort[modified]]">
>    <$link/> {{!!modified}}<br>
> </$list>
>
> ;Newer test
> <$list filter="[[ActionDeleteTiddlerWidget]] [[ActionListopsWidget]]
> +[sort[modified]] +[last[]]">
>
> </$list>
> ;Older test
> <$list filter="[[ActionDeleteTiddlerWidget]] [[ActionListopsWidget]]
> +[sort[modified]] +[first[]]">
>
> </$list>
>
> Tones
>

Thank you Tones! All works and are short!

>
> On Wednesday, 5 May 2021 at 17:05:03 UTC+10 Mohammad wrote:
>
>> 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/b408d343-a850-40b8-b515-0dd43a3739f9n%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/b408d343-a850-40b8-b515-0dd43a3739f9n%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/CAAV1gMBMFadK_%3DT62M0Eht4EMB5yoA%3DGmNyKUe7NPF3mVTvs5Q%40mail.gmail.com.

Reply via email to