Skip to content

Commit 407ff50

Browse files
committed
Disable 12-hour format in the DateTime component
1 parent c87adc4 commit 407ff50

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/webapp/app/components/primitives/DateTime.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export function formatDateTime(
7777
minute: includeTime ? "numeric" : undefined,
7878
second: includeTime && includeSeconds ? "numeric" : undefined,
7979
timeZone,
80+
hour12: false,
8081
}).format(date);
8182
}
8283

@@ -179,6 +180,7 @@ function formatSmartDateTime(date: Date, timeZone: string, locales: string[]): s
179180
timeZone,
180181
// @ts-ignore fractionalSecondDigits works in most modern browsers
181182
fractionalSecondDigits: 3,
183+
hour12: false,
182184
}).format(date);
183185
}
184186

@@ -191,6 +193,7 @@ function formatTimeOnly(date: Date, timeZone: string, locales: string[]): string
191193
timeZone,
192194
// @ts-ignore fractionalSecondDigits works in most modern browsers
193195
fractionalSecondDigits: 3,
196+
hour12: false,
194197
}).format(date);
195198
}
196199

@@ -255,6 +258,7 @@ function formatDateTimeAccurate(date: Date, timeZone: string, locales: string[])
255258
timeZone,
256259
// @ts-ignore fractionalSecondDigits works in most modern browsers
257260
fractionalSecondDigits: 3,
261+
hour12: false,
258262
}).format(date);
259263

260264
return formattedDateTime;
@@ -282,6 +286,7 @@ function formatDateTimeShort(date: Date, timeZone: string, locales: string[]): s
282286
timeZone,
283287
// @ts-ignore fractionalSecondDigits works in most modern browsers
284288
fractionalSecondDigits: 3,
289+
hour12: false,
285290
}).format(date);
286291

287292
return formattedDateTime;

0 commit comments

Comments
 (0)