S S,

Given this reoccurring issue I am taking a deep dive into dates and UTC as 
I did previously with the days operator. I have gained a much deeper 
understanding and will share the results shortly (80% completed)

The aforementioned inability to convert a variable to a date is clearly a 
hindrance, for which I expect to find a work around, 
However I can state that getting dates into the full serial date format, 
and as a UTC value (as in the created and modified fields) is the best 
approach because all tiddlywikis date support goes from there.
If you accept a day month or year and save them in three fields, you can 
then use a macro to concatenate them and generate a serial date, 

The next thing to establish is then how to save it as UTC rather than local 
time so when you use it it will use the local time to display it.

I have used search and prefix in the past to list dates, so I need to work 
out how to adjust local time to to UTC before searching.

I will share more tomorrow ie <+12 hours.

Regards
Tony



On Monday, March 18, 2019 at 12:33:41 AM UTC+11, 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/b7f49de8-e8f7-4f3a-be44-7b529e2b798e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to