Mark, 

Thanks for checking and commenting on your result that sameday is matching 
when the parameter of sameday is one day later. I'm not sure that this is 
just a local vs. UTC time issue since the result I posted above was done at 
08:09 in UTC-7 and thus 15:09 in UTC, both still on 2017-Jan-06. 

I do note that using $view with date format on the string from the tiddler 
field did subtract 7 hours from it, even though I intended it to be a local 
time. Perhaps this emphasizes Tobias's point #2 that dates should always be 
stored as UTC, even when being generated by users or user tiddlers.

Tobias, with respect to your point #5, the reason I believed I should be 
able to work directly with dates as strings stored in fields, including 
doing regexp filtering on them, is because when I get info on a tiddler 
from the drop down menu, it shows the created and modified fields as 
date+time in a YYYY0MM0DD0hh0ss... format. 

To illustrate the point I'm stuck at in trying to use tiddler fields (such 
as my date-journal field) to act as part of a regexp filter parameter (to 
be pre-pended with the "^" anchor), I've put the following example code 
into a tiddler that has a field named 'date-search' which is equal to 
'20160622', a date when some tiddlers in TiddlyWiki version 5.1.13 at 
tiddlywiki.com were modified.

\define concat(1,2,3,4,5)
$1$$2$$3$$4$$5$
\end

\define anchorSearchField()
<$macrocall $name=concat 1="^" 2={{!!date-search}} >
\end

\define wikifiedAnchorSearchField()
<$wikify name=wASF text=<<anchorSearchField>> output=text >
<<wASF>>
</$wikify>
\end

THE FOLLOWING SHOWS THAT USING A LITERAL ANCHORED DATE WORKS AS THE regexp 
PARAMETER <br>
<$vars dateRegExp="^20160622" >
__List of tiddlers with 'modified' field matching 
`"^20160622"`=<<dateRegExp>>__ <br>
<$list filter="[regexp:modified<dateRegExp>]">  
<$link><<currentTiddler>></$link>  {{!!modified}}  <br>
</$list>
</$vars>

THE FOLLOWING SHOWS THAT USING TRANSCLUSION OF THE DATE DOES NOT WORK <br>
<$vars dateRegExp=<<anchorSearchField>> >
__List of tiddlers with 'modified' field matching 
`<<anchorSearchField>>`=<<dateRegExp>>__ <br>
<$list filter="[regexp:modified<dateRegExp>]">  
<$link><<currentTiddler>></$link>  {{!!modified}}  <br>
</$list>
</$vars>

... EVEN IF THE MACRO OUTPUT IS WIKIFIED AS SEEN BELOW. <br>
<$vars dateRegExp=<<wikifiedAnchorSearchField>> >
__List of tiddlers with 'modified' field matching 
`<<wikifiedAnchorSearchField>>`=<<dateRegExp>>__ <br>
<$list filter="[regexp:modified<dateRegExp>]">  
<$link><<currentTiddler>></$link>  {{!!modified}}  <br>
</$list>
</$vars>


The results of this code are shown below:

ToolsReferencesTaggingListListedFieldsAdvancedSources

created 20170108001700345
date-search 20160622
modified 20170108004923404
tags 
title Tiddler to test regexp date selection

<http://tiddlywiki.com/#>7th January 2017 at 5:49pm

THE FOLLOWING SHOWS THAT USING A LITERAL ANCHORED DATE WORKS AS THE regexp 
PARAMETER 
*List of tiddlers with 'modified' field matching "^20160622"=^20160622* 
Generating Static Sites with 
<http://tiddlywiki.com/#Generating%20Static%20Sites%20with%20TiddlyWiki>
TiddlyWiki <http://tiddlywiki.com/#TiddlyWiki> Wed Jun 22 2016 05:13:43 GMT-
0600 (Mountain Daylight Time) 
<http://tiddlywiki.com/#GettingStarted>GettingStarted 
<http://tiddlywiki.com/#GettingStarted> Wed Jun 22 2016 05:13:49 GMT-0600 (
Mountain Daylight Time) 
HTML in <http://tiddlywiki.com/#HTML%20in%20WikiText>WikiText 
<http://tiddlywiki.com/#WikiText> Wed Jun 22 2016 05:22:59 GMT-0600 (
Mountain Daylight Time) 
<http://tiddlywiki.com/#PermaLinks>PermaLinks 
<http://tiddlywiki.com/#PermaLinks> Wed Jun 22 2016 05:13:55 GMT-0600 (
Mountain Daylight Time) 
Translate 
<http://tiddlywiki.com/#Translate%20TiddlyWiki%20into%20your%20language>
TiddlyWiki <http://tiddlywiki.com/#TiddlyWiki> into your language Wed Jun 22 
2016 08:14:41 GMT-0600 (Mountain Daylight Time) 

THE FOLLOWING SHOWS THAT USING TRANSCLUSION OF THE DATE DOES NOT WORK 
*List of tiddlers with 'modified' field matching 
<<anchorSearchField>>=^20160622* 

... EVEN IF THE MACRO OUTPUT IS WIKIFIED AS SEEN BELOW. 

*List of tiddlers with 'modified' field matching 
<<wikifiedAnchorSearchField>>= ^20160622 *

I conclude that even if I try to wikify (and thus in my mind fully render) 
the transclusion of the {{!!date-search}} reference, I just can't 
concatenate the contents of a field with other characters and use the 
result as a filter parameter.

Of course, I welcome any suggestions on how to combine the contents of a 
field with other constant strings to create filter parameters.

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/6a378142-062f-4815-a8e0-399f13b68327%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to