Skip to content

Comments

Use system default locale for date formatting in web UI#480

Open
qm3jp wants to merge 1 commit intodeluge-torrent:developfrom
qm3jp:localize-date-formatting-for-web-ui
Open

Use system default locale for date formatting in web UI#480
qm3jp wants to merge 1 commit intodeluge-torrent:developfrom
qm3jp:localize-date-formatting-for-web-ui

Conversation

@qm3jp
Copy link

@qm3jp qm3jp commented May 8, 2025

should resolve #3639

I used Intl.DateTimeFormat for the localized formatting, which has been widely on all major browsers since at least 2016.

Changes

  • removed hard-coded date formatting
  • added date formatting that uses the default system locale
  • moved the docstring to be immediately before the date formatter function

Examples

locale display
en-US en-US
en-GB en-GB
de-DE de-DE
ja-JP-u-ca-japanese ja-JP-u-ca-japanese

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.

1 participant