I would like to use the ISO week date format for the title of new journal tiddlers and elsewhere, since I find it practical to be aware of the week day in combination with a sortable date format.
YYYY-Www-D or YYYYWwwD
E.g. 2021-w36-4 for thursday of week 36, 2021-09-09.
I can not see a way to get the week day number in the built in date format tokens.
https://tiddlywiki.com/#DateFormat
The closest I’ve got is YYYY-W0WW-ddd, but that renders as 2021-W36-Thu, which will not sort alphanumerically in date order like an ISO date would.
I can see that the template tokens are implemented in a system tiddler named $:/core/modules/utils/utils.js.
Getting the day of week is trivial in JavaScript, e.g. adding a token matching a single “D” for this:
[/^D/, function() {
return date.getDay() || 7;
}]
The utils.js tiddler seems to contain a lot of other stuff however, and I guess local changes would have to be merged on achieving updates of TiddlyWiki.
Maybe there are other ways to achieve custom date formatting of this kind in TiddlyWiki?