I'm having difficulties using the sameday operator to select tiddlers based 
on a date+time field. For example, the following code results in the newly 
created tiddler being listed under the next day's date (hard-coded into 
this example) rather than today's date. 

<$button>Make Tiddler with ~MyDateField=<<now "YYYY0MM0DD0hh0mm">>
<$action-sendmessage $message="tm-new-tiddler" title="Tiddler made now" 
tags="Test" MyDateField=<<now "YYYY0MM0DD0hh0mm">>/>
</$button>

__Tiddlers with sameday in ~MyDateField as <<now "YYYY0MM0DD">>__<br>
<$list filter="[tag[Test]sameday:MyDateField<now>]" >
<$link><<currentTiddler>></$link>   {{!!modified}}  {{!!MyDateField}}
</$list>

__Tiddlers with sameday in ~MyDateField as 20170106__<br>
<$list filter="[tag[Test]sameday:MyDateField[20170106]]" >
<$link><<currentTiddler>></$link>   {{!!modified}}  {{!!MyDateField}}
</$list>

__Tiddlers with sameday in ~MyDateField as 20170107__<br>
<$list filter="[tag[Test]sameday:MyDateField[20170107]]" >
<$link><<currentTiddler>></$link>   {{!!modified}}  {{!!MyDateField}}
</$list>


I understand that there have been some issues around how UTC vs. local time 
are used, such as those discussed in the "TW5 created/modifed info is 
UTC/GMT? (odd results in Recent Tiddlers list)" thread. I'm not certain, 
but I didn't notice this issue on TW version 5.0.9ish. For my immediate 
purposes, it would be sufficient to just match the first eight characters 
of a date+time field. I've tried to construct a regular expression filter 
with the parameter coming from transclusion of another tiddler's field, but 
am stumbling on the concatenation of the "^" anchor with the transclusion 
of another tiddler's field.  Is there some way to apply something like the 
prefix operator to fields (such as my custom date+time) other than titles?

Thanks,
Kevin


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4b8ffd4d-b26a-4f16-aba8-e7e66a3dd499%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to