Properties: let the user customize the way Dates/Times are displayed (independently from OS)

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’

new Date().toDateString()
‘Tue Sep 26 2023’

new Date().toLocaleString(‘en-us’, {year: “numeric”, month: “short”, weekday: “short”})
‘Sep 2023 Tue’

1 Like

+1s have always been welcome. And people have been adding useful comments.

Users can unsubscribe from notifications from single topics. If you are overwhelmed with notifications, you should do so.

1 Like

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).

1 Like

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.

2 Likes

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.

1 Like

Ah, right.
Thank you for clearing that up :+1:
And thank you for the snippets!

Same here. My system setting is in 24 hr and it’ll be nice to display time in 24 hr in Obsidian as well.

It’s not Obsidian. Try this on Windows 10:

I found that page by opening the console; the definition looks like

input[type='datetime-local']

My system’s time/date settings were set to Swiss German defaults, DD.MM.YYYY, Obsidian still showed it as MM/DD/YYYY, which is a pain to read for me.

My Windows Language was set to “English (United States)”. I changed it to “Deutsch (Schweiz)” and everything is fine.

Since you won’t be able to fix Windows, I would suggest to let people define their own format. Hey, it’s Obsidian, right? :wink:

2 Likes

I can also verify that it is broken

Win 10.
I use English as system language and Sweden as region. My preferred date format is yyyy-mm-dd

date properties at set as mm/dd/yyyy

need it to work as daily notes, give me a property to define my date format…

I use json/csv importer to import trading data and this date issue is breaking my dataview queries.

On the screenshot you can see that my old imports (left) display properties in the correct format (yellow)
New imports (right) use slashes even tough the handlebar template is set to date and displays it correctly.

If I use '=this.openPeriod' is also shows me the dates in the US format on the right and German format on the left

On an related issue I also can not import my CSV rows as dates anymore. (purple) They all become underscores as file.name which now renders my queries obsolete… : (

+1. I’m facing the same issue

I wouldn’t call it a “feature request”. This is a bug.

Windows 11 Pro 22H2 build 22621.2428 (English).
Obsidian v. 1.4.16.

Windows time format: YYYY-MM-DD
but Obsidian shows: MM/DD/YYYY (the stupidest possible format).

All we need is Date/Time format in “Apperance” (in the same way that we could define it in “Templates”).

9 Likes

How does the date on Windows taskbar look like?

Another cry for help here.

My windows panel:
image

Calendar settings:
image

What I have in properties:
image

5 Likes

Hey there, just adding to the list.

My formats are set to french :

My languages are set this way so that everything is in English, which is far better for debugging stuff than french :

But here is what my Obsidian is giving me ever since the property plugin exists :

image

I don’t get it.

  • Are you using win 11?
  • How is the date shown in windows’ clock in the system tray?
  • Did you restart obsidian after making these changes on your OS?
  • What does it show in source mode?
  • If you open chrome go to this page. How does the date input look like?

I moved this comment to the appropriate topic:

3 Likes

+1 Same problem with displayed date here.

  • Windows 10Pro x64 latest todate
  • Windows in US locales but tweaked (as I do not like US non-logical format) so system tray uses ISO format YYYY-MM-dd 2023-12-07 (+24hr format HH:mm with leading zeroes)
  • Obsidian installed to Win with those settings (so date was set before obsidian appeared in), Obsidian used daily and Win daily started and shutdown, plenty of opportunities to learn date/time format
  • date in note created by Templater into note via <% tp.date.now() %> results in same date format as for file property type date I made manually = mm/dd/yyyy. And in view mode it shows in US form like 12/07/2023 … However in Source mode I see ISO date-created: 2023-12-07 ! So internally it somehow works, but there is display bug.
  • Chrome page shows ISO
2 Likes

+1
The new properties UI is nice to see.
My fields with ISO dates in them were automatically recognized as dates, and having a date picker and auto completion on the fields now is nice.

However, I’m on iOS.
My language is set to UK English, and my date format is set to YYYY-MM-DD, but Obsidian still displays a US date format, which is super confusing for me.
(The date picker, thankfully, uses ISO format in the source, so I can at least use that to set dates consistently with my existing notes.)

I understand that this feels like something the localization system should be handling, but OS support for using different locales for language/date/measurement or custom date formats really sucks.
GNU/Linux has it through the LC_ variables, and the possibility of building a custom locale, but Electron makes that a pain too.

It would be really nice to be able to override the locale-provided format somewhere in settings.

4 Likes