Is it possible to change the language of the dates format for "ddd"?

Hello!

New to Obsidian and still overwhelmed. I tried to setup a template for daily notes with the {{date: ddd, DD.MM.YYYY}} tag. Works fine, but for ddd, the English day is used. I have the software set to English, so I get where it is coming from. However, I’d like to have the “ddd” in German, not English. Is there a tag/format to do that?

Thank you!

I don’t think there is. You can check the format guide that is linked in the description of that setting, but you’ve probably already done that.

Yeah, I consulted the howto but I did not find a tag for language formatting except for programming languages.

If I’m not mistaken you either need to change the locale of Obsidian running environment, or possibly use Templater to call moment.js which I believe supports setting the locale when calling the format functions.

Thanks for the pointers. I installed Templater and tried to puzzle something together. However, I have to admit that this is way too sophisticated for me. At the moment.js website, I found an example that using

moment.locale(‘es’);

could set the locale. However, I could not figure out how to put that into the template using Templater.
I’d greatly appreciate any hints or ideas.

Here is an example Templater template that lists the a very localised days for various countries:

<%* 
for (const co of ["en", "es", "fr", "de_DE", "nn", "nb", "pt", "uz_AF"]) {
  moment.locale(co)
  tR += "- " + moment.locale() + ": " + moment().format("dddd D MMMM YYYY HH:mm") + "\n"
}
%>

As it stands this returned this list for me:
image

So your case to that format should be something like:

<%* moment.locale("de_DE"); tR += moment().format("ddd[, ]DD.MM.YYYY") %>
6 Likes

Thank you so much! That solves it. :grinning:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.