Just looking at the view widget code. There's a loophole that will allow 
you to display a utc date:

<$list filter="20190101000000000" >
<$view field="title" format="date"/>
</$list>

This works as long as there is no actual tiddler "20190101000000000" . 
Actually, maybe it works even if there is, but I didn't test that. You 
could work this into a macro where the UTC date gets passed to the filter.

Keep in mind, that your padding approach will give an incorrect output if 
you live west of GMT.

--Mark

On Sunday, March 17, 2019 at 6:33:41 AM UTC-7, S. S. wrote:
>
>
> People like to keep dates in fields in different ways.
>
> Normal people use *17-03-2019* or *17/03/2019*
>              Others use *03-17-2019* or *03/17/2019*
> Smart ones      use *2019-03-17* or *2019/03/17*
> The smartest   use *20190317* but it not natural to type in a date this 
> way, and it is very difficult for *the mind* to "*parse*" & "*render*"
>
> To refer to just a year, or a month of the year, or a specific day, all my 
> dates are in 3 formats:
> Today: 2019-03-17
> This month: 2019-03
> This year: 2019
>
> To convert my dates auto to the default 17 character TiddlyWiki format: 
> YYYYMMDDHHMMSSXXX
> was a real pain for me. I managed to do it with a (very painful for me to 
> have made) *<<date {{!!date-field}}>>* macro.
>
> The macro takes any of the above 3 formats and AUTO converts:
>
> 2019           to 20190101000000000
> 2019-03      to 20190301000000000
> 2019-03-17 to 20190317000000000
>
> Then comes the next problem. How do I display this?
> I can't use the <$view> widget, because that can only take input from a 
> *Field*, and my {{!!date-field}} is not in the right format. Only my 
> variable holds the acceptable format.
>
> So what's a good way to display a variable holding 20190317000000000 as: 
> *Sunday 
> 17th March 2019*
>
> Something like: 
>
> *<$text text=<<date {{!!date-field}}>> format="date" template="[UTC] DDD 
> DDth MMM YYYY"/>*Thanks
> *.*
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/4020f71f-856c-4e75-8b75-bd5731d9640c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to