From 4185f3792c84fb81ba74be047a7014be3ab318ec Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Thu, 29 Feb 2024 10:40:13 +0100 Subject: [PATCH] Fix full date display not respecting the locale 12/24h format (#29448) --- app/javascript/mastodon/components/edited_timestamp/index.jsx | 2 +- app/javascript/mastodon/components/relative_timestamp.tsx | 1 - app/javascript/mastodon/components/status.jsx | 2 +- app/javascript/mastodon/features/account/components/header.jsx | 1 - .../features/getting_started/components/announcements.jsx | 2 +- .../mastodon/features/status/components/detailed_status.jsx | 2 +- app/javascript/packs/public.jsx | 1 - 7 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/javascript/mastodon/components/edited_timestamp/index.jsx b/app/javascript/mastodon/components/edited_timestamp/index.jsx index 4ca00f8dda9..7b70f9d6e1d 100644 --- a/app/javascript/mastodon/components/edited_timestamp/index.jsx +++ b/app/javascript/mastodon/components/edited_timestamp/index.jsx @@ -67,7 +67,7 @@ class EditedTimestamp extends PureComponent { return ( ); diff --git a/app/javascript/mastodon/components/relative_timestamp.tsx b/app/javascript/mastodon/components/relative_timestamp.tsx index ac3ab0fb4d4..12530c2b17b 100644 --- a/app/javascript/mastodon/components/relative_timestamp.tsx +++ b/app/javascript/mastodon/components/relative_timestamp.tsx @@ -53,7 +53,6 @@ const messages = defineMessages({ }); const dateFormatOptions = { - hour12: false, year: 'numeric', month: 'short', day: '2-digit', diff --git a/app/javascript/mastodon/components/status.jsx b/app/javascript/mastodon/components/status.jsx index 1171351c51a..be9a1cec659 100644 --- a/app/javascript/mastodon/components/status.jsx +++ b/app/javascript/mastodon/components/status.jsx @@ -554,7 +554,7 @@ class Status extends ImmutablePureComponent {
- {status.get('edited_at') && *} + {status.get('edited_at') && *} diff --git a/app/javascript/mastodon/features/account/components/header.jsx b/app/javascript/mastodon/features/account/components/header.jsx index 233d208c648..07ea227c487 100644 --- a/app/javascript/mastodon/features/account/components/header.jsx +++ b/app/javascript/mastodon/features/account/components/header.jsx @@ -101,7 +101,6 @@ const dateFormatOptions = { month: 'short', day: 'numeric', year: 'numeric', - hour12: false, hour: '2-digit', minute: '2-digit', }; diff --git a/app/javascript/mastodon/features/getting_started/components/announcements.jsx b/app/javascript/mastodon/features/getting_started/components/announcements.jsx index ea36cefd7dc..3c0b53b9e72 100644 --- a/app/javascript/mastodon/features/getting_started/components/announcements.jsx +++ b/app/javascript/mastodon/features/getting_started/components/announcements.jsx @@ -343,7 +343,7 @@ class Announcement extends ImmutablePureComponent {
- {hasTimeRange && · - } + {hasTimeRange && · - } diff --git a/app/javascript/mastodon/features/status/components/detailed_status.jsx b/app/javascript/mastodon/features/status/components/detailed_status.jsx index 437e9e86bff..d10c8966e4a 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.jsx +++ b/app/javascript/mastodon/features/status/components/detailed_status.jsx @@ -311,7 +311,7 @@ class DetailedStatus extends ImmutablePureComponent {
- + {edited}{visibilityLink}{applicationLink}{reblogLink} · {favouriteLink}
diff --git a/app/javascript/packs/public.jsx b/app/javascript/packs/public.jsx index 01b57dce398..d8a4c16034f 100644 --- a/app/javascript/packs/public.jsx +++ b/app/javascript/packs/public.jsx @@ -65,7 +65,6 @@ function loaded() { const timeFormat = new Intl.DateTimeFormat(locale, { timeStyle: 'short', - hour12: false, }); const formatMessage = ({ id, defaultMessage }, values) => {