Skip to content

Updating date helper to support locales better + adding new date formats - #1758

Open
Beedit wants to merge 5 commits into
finamp-app:redesignfrom
Beedit:redesign
Open

Beedit wants to merge 5 commits into
finamp-app:redesignfrom
Beedit:redesign

Conversation

@Beedit

@Beedit Beedit commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Changes

Added in 2 date formats for dd/mm/yyyy and dd MMMM, yyyy (examples: 2/3/2022 and 2 March, 2022 respectively).

This is really simple and just is to accommodate people who use dd/mm/yyyy rather than mm/dd/yyyy (like me).

Todo before merging

  • Translations
  • Reset Settings

Related Issues

Closes #1757 as I found it while writing this lmao.

@Chaphasilor

Copy link
Copy Markdown
Member

Thanks for the PR! I'm wondering if we should just add a "default for locale" option that more flexibly handles this? Also, from my experience the slash / as separator is often used for month/day/year layouts. Is the slash the regular separator for day/month/year layouts in your country?

@Beedit

Beedit commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the PR! I'm wondering if we should just add a "default for locale" option that more flexibly handles this? Also, from my experience the slash / as separator is often used for month/day/year layouts. Is the slash the regular separator for day/month/year layouts in your country?

I think a default for locale option would make sense. The only issue I see with that is that English US being the only English locale, while also being the only one that uses MM/DD/YYYY (I think? idk what Canada does but the UK, AUS, NZ and other English speaking places use ddmmyyyy). This could be solved with more English "translations" too.

Also yes the slash is the most common here. I see "." sometimes (as in 2.3.2022) but not often.

…er than being semi hard-coded.

Translations need discussing as it does slightly change the functionality in every language but en_us.
@Beedit Beedit changed the title Added 2 new date formats. Updating date helper to support locales better + adding new date formats Sep 3, 2026
@Beedit

Beedit commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Yeah thats locale based now and adds a numerical option.

Using 2nd March 2022 as an example, numerical becomes:

  • 3/2/2022 in English
  • 2.3.2022 in Danish
  • 2022-03-02 in Swedish
  • 2022/03/02 in Japanese
  • and basically keeps them consistent across languages

For supporting other English varieties (such as en_gb, which is why I made this in the first place lmao) these would have to be added to weblate. If you added en_gb I can get that "translated" relatively quickly, which is one of them done, and I'm sure that other people can do the same for the other English varieties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants