I’m using multiple computers with different regional settings, and with the properties view this is really confusing. Even with non-slash regions slashes are used, but the order of DD/MM are reversed. I want to see the date as I’ve set up in my templates, not some random format. I can of course set the field to text as a workaround.
According to How to get the Date format in electron - javascript - Stack Overflow Electron uses the system locale to set the date/time format - which is correct for anyone who doesn’t have a different LANG and LC_TIME set. I use en_US for language and en_DK for date/time on Linux, and Obsidian is displaying en_US date format.
The implication of the Stack Overflow discussion is that Electron won’t (and can’t) display the preferred date/time format if it’s not the same as the locale setting, without some work. Though one could hack the locale setting on Linux to “solve” that.
Looking forward to being able to manually set the display in the app itself, I do so on other apps (Thunderbird for example), so that;s a good solution to my mind.
I have a similar setup to @am4c130d with LANG=en_GB.UTF-8 and LC_TIME=de_DE.UTF-8, yet the dates are showing up as 19/09/2023 instead of German style, which should be 19.09.2023 according to my settings.
There is parallel precedent of sorts. Obsidian’s core Daily Note plugin accepts any date formatting supported by moments.js, as does the core plugin Templates, and the core plugin Unique Note Creator. In fact, all three of those core plugins can have different date formats.
(One might wonder why “date” formatting is handed internally within Obsidian settings for the most part, except for the one case where date formatting is tied to the OS. Noting in the UI tells us to look in OS settings.)
Another +1 for this, changing system settings just for one app is very weird. But regardless of that I’m on Linux so it’s more of a hassle and I haven’t been able to get it working in the first place as others have mentioned.
I did want to call out one extra part that I don’t see people discussing:
When you make this change please also add an option to switch between 24hr and 12hr time modes independant of the date format.
I am in the US so the date format works fine for me but I much much prefer 24hr times and the new datetime picker has no way to change that.
This is definitely broken on Win 10. Obsidian does not respect the OS short-date setting.
I like Obsidian, but to expect me to change the OS language setting is a bridge to far…
Could a possible workaround be to format the date using the ‘locale’ and ‘options’ parameters in Date.toLocaleString([locale], [options]). Then you could read those values from settings?
Also +1 that the setting needs to take time into account.
In the console I got the following results when trying different options:
navigator.language
‘en-US’
navigator.languages
(2) [‘en-US’, ‘sv-SE’]
new Date()
Tue Sep 26 2023 14:05:19 GMT+0200 (Central European Summer Time)
new Date().toLocaleString()
‘9/26/2023, 2:05:53 PM’
new Date().toLocaleString(‘sv-se’)
‘2023-09-26 14:07:45’
new Date().toISOString()
‘2023-09-26T12:09:17.555Z’
I think they specifically mean comments that only say “+1” (or equivalent) with no additional content, which are discouraged by the FAQ they linked to (and are annoying if you want to follow the conversation but inevitable because the Like button isn’t an obvious enough way to upvote).
I have the problem that the dates are shown in my preferred format (DD.MM.YYYY), but the input has to be YYYY-MM-DD.
So, I have written all dates as DD.MM.YYYY in the properties, but since the last update it shows the wrong dates, when I set the properties to visible.
Example:
When I write the date “29.09.2023” into the date section in the properties, the output is “20.09.2029”.
If I input it as “2023-09-29”, the date is parsed correctly and shown as “29.09.2023”.
Does anybody know, whether it’s possible to change the input format for the properties?
Obsidian 1.4.14
Windows 11 Pro 22H2
Short date format on OS: DD.MM.YYYY
When I write dates in the frontmatter I (almost) always go for YYYY-MM-DD. As it is now, Obsidian Properties View will render dates as MM-DD-YYYY, which is neither of my two “accepted” formats.
My take:
Obsidian should not assume my preferred formatting. What I want in Obsidian is not necessarily the same as what I want from other applications, or my OS in general.
Using USA based units or formats as the default is a bad idea (sorry), especially if you want to attract/keep international users.
Side note:
Why are document properties still rendered in reading mode when I’ve both disabled the Properties View plugin and set Editor > Properties in document to Source?
Even after restarting Obsidian.
The Properties view plugin is only for the Sidebar tabs (Show all properties & Show file properties). For hiding the Properties view in Reading mode, you could use the CSS snippet here.