Hi,

I have the following question:

My TW has titled tiddlers with a prefix that references dates, as in the 
examples below:

20180115 - Content of the Past
20180228 - Present Content
20180315 - Content of the Future

I have a macro (StartupActions: 
http://ooktech.com/jed/ExampleWikis/StartupActions/) that is turned on for 
page load, directing the fill of fields of certain tiddlers, with an 
appropriate status: past, present or future.

Question:

How can I build a filter that can display each of these conditions, past, 
present, and future, based only on the prefix analysis contained in the 
titles, compared to the system date I get from the macro << now YYY0MM0DD >>

My code:

\define tempNodeColor()
<$set name="hoje" value=<<now YYYY0MM0DD>> >
<$set name="tagMesM" value=<<now YYYY-0MM>> >

 <!-- ADICIONA COR GREEN AO NODE DO MM E TAG ANO-MES DO MES CORRENTE, CASO 
NÃO EXISTA -->

<$list filter="[all[]prefix<hoje>]">
<$action-setfield $field="_tgr_node_class_add" $value="my-green-node" />
<$action-listops $field=tags $subfilter='+[append<tagMesM>]'/>
</$list>

<!-- ADICIONA CORES AO NODE DO MM PARA CONTEÚDOS TAGEADOS COM 
EVENTOS-REALIZADOS E EVENTOS-REALIZANDO -->

<$list filter="[tag[Past]]">
<$action-setfield $field="_tgr_node_class_add" $value="my-gray-node" />
</$list>

<$list filter="[tag[Present]]">
<$action-setfield $field="_tgr_node_class_add" $value="my-green-node" />
</$list>

</$set>
</$set>
\end

<<tempNodeColor>>



-- 
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/930953b1-e643-43b2-b4a3-d876267acb75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to