I find the docs for https://tiddlywiki.com/#DateFormat insufficient and I want to improve with a more general intro about date formats and also an explicit use example. I figure I’ll bounce it here before making a PR, so what do you say about the following modification ideas.
I want to change the initial paragraph from the current:
When used to display date values (with the
format
attribute set to ‘‘date’’), the ViewWidget accepts atemplate
attribute that allows the format of the date values to be specified. The format string is processed with the following substitutions:
…into…
The
created
andmodified
fields contain a compact time format string such as20211002153802059
. Transcluding such a date field automatically applies a template for a more legible format, e.gSat Oct 02 2021 17:40:50 GMT+0200 (Central European Summer Time)
.For full control of the display format, the ViewWidget accepts a
template
attribute to specify a date value format. The format string is processed with the following substitutions:
[…]
IMO the doc also needs an explicit example, i.e the wikitext for it and the evaluated result. I figure this should be put at the very end of the tiddler:
<$view field=modified format=date template="DDth mmm YYYY 0hh:0mm:0ss" />
<$view field=modified format=date template=“DDth mmm YYYY 0hh:0mm:0ss” />
Thoughts?
Thanx.