Tiddler Date: Changing Format

84 views
Skip to first unread message

Qalisto

unread,
Dec 4, 2019, 3:47:13 AM12/4/19
to TiddlyWiki
I seem to be unable to find the tutorial or info on how to change the date format of a newly created Tiddler.

(The date under the Title)

The default gives me:

"4th December 2019 at 8:40am"

I want:

"2019 12 04  0840 [UTC]"

OK, maybe TW5 does not support the timezone designation, but just to fix the date / hour would be great!

Where is the Shadow Tiddler or the "Macro" which controls this formatting?

Thank you and best regards!

Eric Shulman

unread,
Dec 4, 2019, 5:05:52 AM12/4/19
to TiddlyWiki
On Wednesday, December 4, 2019 at 12:47:13 AM UTC-8, Qalisto wrote:
I seem to be unable to find the tutorial or info on how to change the date format of a newly created Tiddler.
(The date under the Title) The default gives me: "4th December 2019 at 8:40am"
I want: "2019 12 04  0840 [UTC]"

In $:/core/ui/ViewTemplate/subtitle, you will find:
<$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>

In $:/language/Tiddler/DateFormat, it says:
DDth MMM YYYY at hh12:0mmam

You can change this to:
[UTC]YYYY 0MM 0DD 0hh0mm [UTC]

Note that the first "[UTC]" is a date formatting code that "time shifts" from local time to UTC, while the second "[UTC]" is simply literal character output.

see https://tiddlywiki.com/#DateFormat for all the possible date formatting codes

enjoy,
-e







 

TonyM

unread,
Dec 4, 2019, 4:25:20 PM12/4/19
to TiddlyWiki
Hi

The date under the title is the modified date and Eric has shown you how to change how it appears in the subtitle.

However you can use the view widget to display and date field however you want.

Tony

Qalisto

unread,
Dec 5, 2019, 2:03:20 PM12/5/19
to TiddlyWiki
We are lucky to have a living community here ... and wizards like Eric walking in our midst.

=== > Q < ===========================================
Reply all
Reply to author
Forward
0 new messages