filter to get tiddlers newer than a given date

76 views
Skip to first unread message

James Anderson

unread,
May 3, 2021, 6:56:30 PM5/3/21
to TiddlyWiki
Hello,

I've tried [all[tiddlers]get[modified]compare:date:gt[2021]] in advanced search but this seems to give me links to tiddlers named after modified field

eventually would like to do this in a plugin via $tw.wiki.filterTiddlers, is there a way to do this in the advanced search on the filters tab? If nto what is the best way to do this in a widget?


thanks,
James

TW Tones

unread,
May 3, 2021, 7:53:26 PM5/3/21
to TiddlyWiki
James,

get[modified] will return only tiddlers with a modified date if it has a value, you then ask it to be ones with 2021 (or greater).

I am not sure what your question is!

"tiddlers named after modified field" ?

Tones

Mark S.

unread,
May 3, 2021, 10:30:17 PM5/3/21
to TiddlyWiki
You need the "filter" operator which is actually a subfilter operator. It requires you to pre-specify the inner filter with a variable:

<$vars myfilt="[get[modified]compare:date:gt[2021]]">
<<list-links "[all[tiddlers]filter<myfilt>]">>
</$vars>

James Anderson

unread,
May 4, 2021, 3:09:42 AM5/4/21
to TiddlyWiki
Hey Mark,

that doesn't seem to work in the advances search filters tab (see attachment) I assume it won't work with $tw.wiki.filterTiddlers in a plugin either.

>TW Tones
if you put this into the seach box in the image i attached hopefully it's clearer [all[tiddlers]get[modified]compare:date:gt[2021]] 

I would just like a way to return a list of tiddlers older or newer than a given date (though the date might be a custom field in the future)

Thanks

James
キャプチャ1.PNG

Saq Imtiaz

unread,
May 4, 2021, 4:01:28 AM5/4/21
to TiddlyWiki
Try this:

[all[tiddlers]] :filter[get[modified]compare:date:gt[2021]]

James Anderson

unread,
May 4, 2021, 4:22:21 AM5/4/21
to TiddlyWiki

Thanks! This seems to be what i am after :)

TW Tones

unread,
May 4, 2021, 4:46:56 AM5/4/21
to TiddlyWiki
James,

You can also use the days operator, but it is a little tricky to use.

Tones

James Anderson

unread,
May 4, 2021, 8:08:24 AM5/4/21
to TiddlyWiki
thanks Tones, that is also useful!
Reply all
Reply to author
Forward
0 new messages