How to change the modified date format?

I’m trying to figure out how to change the modified date format. I see it’s tied to subtitle tiddler somehow. I would like it to show yyyymmdd.hhmm format, not the way it shows now.

Sorry for typos, falling asleep in my chair.

So you want to alter the format that appears in the tiddler subtitle?

See SystemTag: $:/tags/ViewTemplate/Subtitle

Edit $:/language/Tiddler/DateFormat or Or edit $:/core/ui/ViewTemplate/subtitle/modified
<$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>

to

<$view field="modified" format="date" template="YYYY0MM0DD.0hh0mm"/>

Note the zeros to maintain the same length.

Thanks, you gave me an exact answer and I see the format in /language/Tiddler/DateFormat that makes it the current date. I understand the logic of this being under language, since it’s tied to the us English (in my case anyway) and that’s the format in the US.

What I’m still wrapping my head around is the how. So:

  1. I see $:/core/ui/ViewTemplate calling to all tiddlers tagged with $:/tags/ViewTemplate.
  2. One of those is $:/core/ui/ViewTemplate/subtitle, which I saw is responsible for the date (it shows as the output).
  3. $:/core/ui/ViewTemplate/subtitle calls to all tiddlers with $:/tags/ViewTemplate/Subtitle.
  4. $:/tags/ViewTemplate/Subtitle calls to $:/core/ui/ViewTemplate/subtitle/modifier and $:/core/ui/ViewTemplate/subtitle/modified.
  5. Modifier is just a… link? to itself? (that part I’m not sure about), while modified calls to show the modified field (as in modified date, I assume), formats it as “date”, based on the template $:/language/Tiddler/DateFormat
  6. Finally, $:/language/Tiddler/DateFormat gives us the date in the form I see right now,
    MMM DD, YYYY at hh12:0mm am.

Now, assuming I don’t want to change any of the default files and make my own, which is what I’ve been doing so far, there’s a bit of an issue here.

  1. I could create $:/custom/Tiddler/DateFormat (for example) and write YYYY0MM0DD.0hh0mm in it, but then I’ll have to modify $:/core/ui/ViewTemplate/subtitle/modified to point to it: <$view field=“modified” format=“date” template={{$:/custom/Tiddler/DateFormat}}/>
  2. What you suggested, <$view field=“modified” format=“date” template={{$:/language/Tiddler/DateFormat}}/>, goes in and changes $:/core/ui/ViewTemplate/subtitle/modified and will essentially do the same thing, but will change the date format after $:/language/Tiddler/DateFormat is called, if i get this correctly.
  3. I guess I could untag $:/core/ui/ViewTemplate/subtitle/modified so it doesn’t have the $:/tags/ViewTemplate/Subtitle tag, and then create my own (number 1 above) and that that one instead. I still don’t fully like this, but it’s better in my mind than changing one of the original ones.

What do you think, what would you do to make this the least invasive as possible? I appreciate you taking the time to read this, I enjoy learning these things (when I’m awake and caffeinated xD)

I recomend you create a tiddler tagged h $:/tags/ViewTemplate/Subtitle with the formatted modified date you want and if desired remove the same tag from the existing one that displays modified.

1 Like

If you untag a shadow tiddler, it will become a system tiddler. So technically you do change it. That’s not a problem as long as the core tiddler isn’t changed and you want to have the new function. … You will need to remember, that you changed it at some time.

The control-panel Overwritten shadow tiddlers will show a list of them.

So if you do change it anyway, why bother to create your own tiddler and have to remember 2 changes instead of 1. … For a very specific modification it is needed to start to modify core tiddlers. … You only need to remember it.

Yes this makes sense now that I read what you say.
I’m coming from the direction that I want the “original” wiki to stay as clean as possible, with integrated settings.

A good example of this is having my own CSS (not just in the wiki, in a file in the repository) with comments of what I changed and why (the wiki itself has the “how” often). This makes things clear for myself and also for folks who’d like to visit and see what changes I made and what they do.

So in this case, yes, two changes instead of just a quick one, but at the same time I could point to the original tiddler (which is now a system tiddler) and say “this was the original one, it was tagged this way, you, reader, have it in your own wiki…” that sort of thing. I don’t know, still makes more sense to me.

Because your own tiddler can be in your namespace and when you look at the modified core tiddler you can see no edit occurred, just the tag removed.

  • However unless there is more to be done in the subtitle you could show both modified dates with no trouble.
  • I can always see what I have added because it is a tiddler in my $:/PSaT namespace.
  • I have a clone button which records the source-tiddler in my new tiddler as well which I can see where I got it from?
    • Open the core tiddler and delete it to restore the shadow is a very simple process.

CSS is a completely different thing. Here best practice is always to have your own StyleSheets instead of overwriting shadow tiddlers. CSS is built to be used that way.

TW UI templates do have some flexibility built in, but it depends on how “old” they are. The rule of thumb here is: The older the less flexible

That’s right, but if you do it that way it’s really hard to find out, what has been changed. TW allows you to preview the “diff” differences between a system tiddler and a shadow tiddler, if there is one. See screenshot below. Your workflow will make the preview much harder.