On the default tiddlywiki file (tiddlywiki.com) I created tiddlers with titles reflecting content of their “date” field and contents of their “timespan” field.
“date” field contains date at midnight e.g. 20251029000000000 (note: in the screenshot I missed two zeroes when writing the example but the actual fields are correct nonetheless).
“timespan” field contains negative integer.
Using a nested list I am trying to display tiddlers with date field being x or more days in the past (indicated by the negative integer in “timespan” field).
Dates that are 1-3 days in the past work as expected but 4 or more days in the pasts seem to pass the filter one day too early.
The list looks like this:
<$list filter=“[has[date]]”>
<$list filter=“[all[current]!days:date{!!timespan}]”>
<$link/>
</$list>
</$list>
Am I just confused about the usage of days operator or is this a bug/inconsistency? It seems weirdly arbitrary how the expected behaviour breaks after -3.
Hello, thank you for your answer!
I read the thread you linked and the official documentation.
I still do not understand what leads to the behavior in my screenshot:
Today is 29.10.2025.
A tiddler with date=20251027000000000 (2 days ago) is filtered out (as expected) with [!days:date[-3]].
A tiddler with date=20251026000000000 (3 days ago) is NOT filtered out with
[!days:date[-4]].
Notice how the list does not change between [!days:date[-4]] and [!days:date[-3]].
I would expect the [!days:date[-5]] be empty and [!days:date[-4]] contain only one item.
Hi @uusminuus
I think the problem is the date format.
Your format is [UTC]
the format in the example was <td><$view field=due format=date template="0DDth, MMM, YYYY"/></td>
Your format should be something like <td><$view field=due format=date template="[UTC]DDth MMM YYYY" /></td>
Sorry @Mark_S
it took me so long to answer I hadn’t realised that you had already replied.
I’m unsure about the date field can you call it date or is this reserved in some way?
Hello, thank you for joining in helping.
My local time is UTC+2. I was not within 2 hours of midnight when noticing this problem. The problem happened when I used automatically saved timestamp in a field in UTC format. But I can’t resolve this by just changing the time part of the timestamp.
The problematic change in behaviour in my example screenshots happens when I change the timestamp by exactly one day and the parameter by exactly 1. The change in behavior happens when parameter goes from -3 to -4.
When parameter is -3, it does filter out a tiddler with timestamp that is 2 days ago (as I’d expect).
When parameter is -4, it does not filter out a tiddler with timestamp that is 3 days ago (why?)
It would help if you could post your test tiddlers, or even your entire TW file (like at tiddlyhost.com) Otherwise we each have to hand-create the data, leading to more errors.
What we need is a screenshot of what you see, plus the local time when you see it. And I know you may have to tweak your data now because time marches on. I had to reset all the data, picking a noon time just to make the math easier. Once I did that, everyone looked as expected.
Ha! This might be the most confusing week of the year to be comparing timestamps!
“Ha! This might be the most confusing week of the year to be comparing timestamps!”
Wait. It is starting to make sense now.
26th october our local time moved 1 hour back when daylight saving time ended. That is the date where the one day offset happens.
Since the days filter does not seem to care about the time, only the date (making it effectively 00:00), I believe at some moment in the comparison the changing daylight saving time gives -1 hour, moving the date to previous one (before midnight).