Eric/all,
Glad I could teach you something for a change, you are always teaching me
something, thanks for expanding this knowledge to include the tiddlers
widget.
All,
So just to be clear a revolutionary approach here we can use variable dates
to view Widget
should look like this
Working examples on tiddlywiki.com, added to top post.
\define var-date() 19230217
<$set name=today-date value="20200731">
<$set name=formatted-date value="2020/31/07">
<$wikify name=field-date text="{{!!field-date}}">
Format variable date <$list filter=<<var-date>> >
<$view field=title format="date" template="YYYY-0MM-0DD"/>
</$list>
or
Tomorrow <$list filter="[<today-date>add[1]]" >
<$view field=title format="date" template="YYYY-0MM-0DD"/>
</$list>
or
Yesterday <$list filter="[<today-date>subtract[1]]" >
<$view field=title format="date" template="YYYY-0MM-0DD"/>
</$list>
or
Formatting <<formatted-date>> to
<$list filter="[<formatted-date>split[/]join[]]" >
<$view field=title format="date" template="YYYY-0MM-0DD"/>
</$list>
Or
>From field as variable <$tiddler tiddler=<<field-date>> >
<$view field=title format="date" template="YYYY-0MM-0DD"/>
</$tiddler>
</$wikify></$set></$set>
Regards
Tony
On Friday, July 31, 2020 at 1:27:25 PM UTC+10, Eric Shulman wrote:
>
> On Thursday, July 30, 2020 at 7:02:51 PM UTC-7, TW Tones wrote:
>>
>> For example provide a literal date as a variable via the list, but use
>> the title as a field
>> <$list filter="[[20210506]]">
>> <$view field=title format="date" template="YYYY-0MM-0DD"/>
>> </$list>
>>
>
> Very clever!
>
> Note also that you can use the <$tiddler> widget to achieve the same
> effect:
> <$tiddler tiddler="20210506">
> <$view field=title format="date" template="YYYY-0MM-0DD"/>
> </$tiddler>
>
> I just updated http://TiddlyTools.com/timer.html to use this technique in
> the TiddlyTools/Timer, timer_showdate() macro.
>
> Previously, I was constructing my date/time format by manually splitting
> the 17-digit timestamp into parts and
> then outputting the parts individually. Using your method of formatting
> a variable containing a timestamp,
> the code is much simpler... and, it also made it possible to add a
> configuration option in TiddlyTools/Timer/Setup
> so that the Task timer date/time format now can be easily customized.
>
> Good catch!
>
> -e
>
>
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/3a030f90-5c21-4886-ac7b-da1f1ff87ca6o%40googlegroups.com.