Filter for Tiddlers Modified Before a date

72 views
Skip to first unread message

Aidan Grey

unread,
Sep 6, 2019, 2:31:54 PM9/6/19
to TiddlyWiki
Heya,

I know how to get the internal tiddlywiki code for the modified date - how do I filter for the tiddlers that were last modified before that date?

Use case - my sorting thing, where I need to sort a huge list of items into categories via tagging. New categories may be discovered and added.

If the new category "Baking" is created on date 20190906181756050, how do I filter to get all the items that were sorted before/last modified before that new category was created? I will need to go back and make sure that I tag any items that I may have missed before. For example, I may just tagged "walnuts" in Nuts, but they should be tagged for Baking too, now that I have that category.

Thanks,
Aidan

TonyM

unread,
Sep 6, 2019, 8:09:39 PM9/6/19
to TiddlyWiki
Aidan,

A Quick tip. Although there are numbers that are not valid in dates like the 99th of the month, all date serial numbers are just numbers. It is quite easy to list items with a prefix of YYYYMMDD as an example. If you are gentrating such dates ensure each has a leading zero YYYY0MM0DD

The reveal widget allows for > < and = comparisons as do other calc or formula plugins.

However If you want to design something relative to today have a look at the days operator which has a form of > = < test built in.

In your example in the tiddler banking you could use the created date to feed into a days operator to list all (filtered items) with an older created date using the days filter.

Note: The Trick with the days filter is it is relative to the key date do -7 days lists dates from -7 through to 0 and forward, where +7 lists dates 7 days in the future through 0 and into the past. Two can be combined to get exact periods.

Regards
Tony

BurningTreeC

unread,
Sep 7, 2019, 8:52:24 AM9/7/19
to TiddlyWiki
Hi Aiden,

maybe the following filter works for you use-case:

<$list filter="[all[tiddlers]allbefore<currentTiddler>!sort[modified]]">

</$list>


TonyM

unread,
Sep 7, 2019, 9:05:07 AM9/7/19
to TiddlyWiki
BTC

That is inspired. Love it.

Leveraging the great title sorting and listing features of filters, then using allbefore (a list manipulation tool) to exclude those relative to a specific tiddler title, in this case the current tiddler.

The mind boggles what we can do with the other "order and listops operators" starting with allafter.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages