I decided to create a new editor toolbar button that, upon clicking, is meant to put a timestamp whereever the text cursor is located using $:/language/Tiddler/DateFormat as the default format if the target tiddler doesn’t have the field timestamp-format
with anything in it.
Well… it, sort of works? I have the tiddler $:/core/ui/EditorToolbar/timestamp
with the text:
<$action-sendmessage
$message="tm-edit-text-operation"
$param="insert-text"
text={{{ [<targetTiddler>has[timestamp-format]then<now>format:date{!!timestamp-format}else<now>format:date{$:/language/Tiddler/DateFormat}] }}}
/>
For some some reason, the inserted text shows as 00-1-12-31 23:43:52
(the format in $:/language/Tiddler/DateFormat is YYYY-0MM-0DD 0hh:0mm:0ss) and it doesn’t matter if timestamp-format exists or not.
Any help with figuring out why this is the case would be greatly appreciated