Hi all,

I'm trying to perform some actions based on the time of day. I'm unable to 
get the current date/time without resorting to a button push that sets a 
timestamp in a field that will serve as the state for the reveal widget.

Is there a way for the state text reference to automatically update or at 
least get wikified? When I place <<now hh>> in my state tiddler, the reveal 
widget only returns a match if "<<now hh">> is referenced directly. 
Matching <<now hh>> as a state tiddler value with a "12" for the time 
returns nothing.

Here's my code (one that involves a manual refresh button). I would be 
grateful for suggestions. Thank you!

\define RefreshButton()
<$button actions=<<RefreshButtonAction>>>
Refresh</$button>
\end

\define RefreshButtonAction()
<$action-setfield $field="timestamp" $value=<<now hh>>/>
\end

<$reveal state="!!timestamp" type="gt" text=12> 
It's after noon
</$reveal>

<<RefreshButton>>

Best regards,
Hubert


-- 
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/6cae99d4-ff0a-4908-96a5-403495328303%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to