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