I know I'm late to his party...
but for those like me stumbling through these forum posts in the search for answers:
I think comparison can be done by first sorting and then truncating (chopping a bit off) the sorted list.
I've got two different methods:
1. Sort then Truncate using
firstHere's what I used for a "Recent Activity" list.
<$list filter="
[!prefix[Draft of]tag{!!title}!nsort[modified]]
+[first[5]]
" />
This should return a list of the 5 most recently modified tiddlers tagged with the title of the current tiddler.
2. Sort then truncate using
allbeforefor the OP's usecase:
<$list filter="
[has[dayofmonth]]
+[nsort[dayofmonth]]
+[allbefore[25]]
" />
This should return a list of all the tiddlers with a dayofmonth field that is less than 25.
notes:
*you can squish the same filters into one line, but you can also have whitespace around complete [[]] or [{}] filters. I used the latter for clarity.
*the ! in !nsort makes the sort descending (newest to oldest), by default it is ascending (oldest to newest)
I hope this method helps people to build their todo lists and filterable custom calendars :)