a tool for shared writing and social publishing

Add localisation to dates #16

closed
opened by ewancroft.uk

Currently, Leaflet defaults to MM/DD/YYYY with displaying dates. This is generally okay since it displays the month name in full, but it would be nice if you could select which format you would use, or base it on browser or system locale.

I personally use DD/MM/YYYY so MM/DD/YYYY sometimes bugs me. It's not that bad, just a nice-to-have.

Do we have anywhere in literal MM/DD/YYYY format or you're talking about in post meta where it's like October 21, 2025? I don't think this is a thing we'll change short term but could see eventually having more options for this kind of thing as a pub setting along with things like url slug format!

I'm talking about the date display on the publication archive / index page and Bluesky post blocks specifically. They display in MM/DD/YYYY whereas the documents seem to display in DD/MM/YYYY.

Oh hmm gotcha! For me it's the same in both individual post and pub home/index page. Looking more closely, I think we use toLocaleDateString everywhere so should be aware of region/language-based standards, but this might be a thing where there's a difference if one's server rendered and one on client? cc/ @awarm.space [testing, not sure if mentions work here]

Yep, it's a server vs client rendered issue, I just pushed some fixes to pull locales and timezones from request headers, which should render it as what you expect everywhere. Let me know if you test and run into any further issues!

Thought I replied earlier. It seems to be fixed! Thank you both.

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 3
AT URI
at://did:plc:ofrbh253gwicbkc5nktqepol/sh.tangled.repo.issue/3m4472bem3422