How to change the date format in tiddlers' headers?

216 views
Skip to first unread message

nbdsp

unread,
May 14, 2015, 12:49:56 PM5/14/15
to tiddl...@googlegroups.com
Currently the 'modified' date in tiddlers is formatted as relative backward intervals: "10 days ago", "12 min ago" and the like. I'd like to change it to something else. I found a recommendation to create a systemConfig tiddler with the following lines:

config.views.wikified.dateFormat = "YYYY-0MM-0DD 0hh:0mm";
config.macros.timeline.dateFormat = "YYYY-0MM-0DD (ddd)";

But this hasn't changed the date format in tiddlers' headers. How does one change that date format?

Thanks,
Albert.

Eric Shulman

unread,
May 14, 2015, 2:13:49 PM5/14/15
to tiddl...@googlegroups.com
On Thursday, May 14, 2015 at 9:49:56 AM UTC-7, nbdsp wrote:
Currently the 'modified' date in tiddlers is formatted as relative backward intervals: "10 days ago", "12 min ago" and the like. I'd like to change it to something else. I found a recommendation to create a systemConfig tiddler with the following lines:

config.views.wikified.dateFormat = "YYYY-0MM-0DD 0hh:0mm";
config.macros.timeline.dateFormat = "YYYY-0MM-0DD (ddd)";

Those instructions are for use with TiddlyWiki Classic.

Modern TiddlyWiki (v5+) uses a different approach.

To change the display of the modification date in the tiddler header:

1) from the sidebar, open the "advanced search" tiddler (click on the magnifying glass next to the search input field)
2) in the "Shadows" tab, search for
   $:/core/ui/ViewTemplate/subtitle
3) open that tiddler, and edit it
4) note this widget:
   <$view field="modified" format="relativedate"/>
5) To format the date the way you want, change this to:
   <$view field="modified" format="date" template="YYYY-0MM-0DD 0hh:0mm"/>

It's even easier to change the date format used in the Recent tab in the sidebar:

Using the "advanced search" tab again, search for
   $:/language/RecentChanges/DateFormat
Then, edit that tiddler and change the content to your desired date format string.

That should do it.


enjoy,
-e
Eric Shulman
ELS Design Studios
TiddlyTools - "Small Tools for Big Ideas!"
InsideTiddlyWiki: The Missing Manuals

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...




nbdsp

unread,
May 14, 2015, 2:39:18 PM5/14/15
to tiddl...@googlegroups.com
Many thanks, Eric!

Albert.
Reply all
Reply to author
Forward
0 new messages