using allafter with modified field

43 views
Skip to first unread message

vpl

unread,
Mar 4, 2020, 5:08:48 AM3/4/20
to TiddlyWiki
Hi,

I try to retrieve tiddlers that have been modified before a specific time (not date ..)
The below filter 
<$list filter="[tag[spotify-track]get[modified]]"></$list>
returns

Then when I apply 

<$list filter="[tag[spotify-track]get[modified]allafter[20200303155857027]]"></$list>
I get  20200304093151389 which looks stranges as this time stamp is 15h58mn the 3rd of march
and after this date I should get 3 answer (2 with 19:xx the 3rd and the one the 4th of march)

how cis working ?

Regards


But if I just change the minutes for examples from 19h07 to

Eric Shulman

unread,
Mar 4, 2020, 5:52:22 AM3/4/20
to TiddlyWiki
On Wednesday, March 4, 2020 at 2:08:48 AM UTC-8, vpl wrote:
I try to retrieve tiddlers that have been modified before a specific time (not date ..)
The below filter 
<$list filter="[tag[spotify-track]get[modified]]"></$list>
returns
<$list filter="[tag[spotify-track]get[modified]allafter[20200303155857027]]"></$list>
I get  20200304093151389 which looks strange as this time stamp is 15h58mn the 3rd of march
and after this date I should get 3 answer (2 with 19:xx the 3rd and the one the 4th of march)

Note that the list you are showing is NOT automatically sorted by date/time value, so the result you get only shows the items after the specfied "marker".

Try adding a sort filter, like this: 
<$list filter="[tag[spotify-track]get[modified]sort[]allafter[20200303155857027]]"></$list>

That should give you the results you are expecting.  Let me know how it goes.

enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)




vpl

unread,
Mar 4, 2020, 7:37:37 AM3/4/20
to TiddlyWiki
Hi Eric

Thanks for your quick answer
This helps, but I still don't understand why the time is not evaluated 

If I recapitulate
<$list filter="[tag[spotify-track]get[modified]sort[]]"></$list> returns (sorted !)


<$list filter="[tag[spotify-track]get[modified]sort[]allafter[20200303155857027]]"></$list> returns
Fine !

But if I just change the time of the previous filter from 15H to 16H I should still ge the 3 values as the next one is at 19H
When I run
<$list filter="[tag[spotify-track]get[modified]sort[]allafter[20200303165857027]]"></$list>
I get an empty list

is the data evaluated in the allafter ?

Thanks for your help

Regards

Eric Shulman

unread,
Mar 4, 2020, 11:01:18 AM3/4/20
to TiddlyWiki
On Wednesday, March 4, 2020 at 4:37:37 AM UTC-8, vpl wrote:
But if I just change the time of the previous filter from 15H to 16H I should still ge the 3 values as the next one is at 19H
When I run
<$list filter="[tag[spotify-track]get[modified]sort[]allafter[20200303165857027]]"></$list>
I get an empty list
is the data evaluated in the allafter ?

allafter[] is not a "greater than" function!  Rather, it is part of the set of "listops" filters, and the parameter of the allafter[] filter -- the "marker" -- has to be IN the list.

As defined in the (minimal) documentation:

purpose discard all items except those after the marker
parameter marker = the list item to be used as a marker
output all items after the marker

Thus, when you change the parameter value to something not in the list, it returns an empty list.

-e

Reply all
Reply to author
Forward
0 new messages