Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

Use locale parameter for date formatting (#1637)

valtteri1010d1e5b00c52cd
diff --git a/packages/date_utils/src/DateFormatting.ts b/packages/date_utils/src/DateFormatting.ts
index 1696b509e..835201e40 100644
--- a/packages/date_utils/src/DateFormatting.ts
+++ b/packages/date_utils/src/DateFormatting.ts
@@ -70,7 +70,7 @@ export function getFormattedCompactDateTime(
hour12?: boolean,
): string {
const date = parseDate(timestamp);
- const datePart = getDateFormatter('en-US', {month: 'numeric', day: 'numeric', year: '2-digit'}).format(date);
+ const datePart = getDateFormatter(locale, {month: 'numeric', day: 'numeric', year: '2-digit'}).format(date);
const timePart = getDateFormatter(locale, {
hour: 'numeric',
minute: '2-digit',