Fix date/time formatting to use es-ES locale
- Update all date/time formatting functions to use 'es-ES' locale instead of 'en-US' or 'de-DE' - Update utility functions in utils/date.ts and utils/exchange.ts - Update all component files that use date formatting - Update e2e test helper to match new Spanish date format - All formatting now uses Spanish locale regardless of selected language as per PR requirements
This commit is contained in:
parent
d2fc7d8850
commit
e35e79e84d
19 changed files with 146 additions and 50 deletions
|
|
@ -17,7 +17,7 @@ export function formatDate(d: Date): string {
|
|||
*/
|
||||
export function formatTime(isoString: string): string {
|
||||
const d = new Date(isoString);
|
||||
return d.toLocaleTimeString("en-US", {
|
||||
return d.toLocaleTimeString("es-ES", {
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
hour12: false,
|
||||
|
|
@ -29,7 +29,7 @@ export function formatTime(isoString: string): string {
|
|||
*/
|
||||
export function formatDateTime(isoString: string): string {
|
||||
const d = new Date(isoString);
|
||||
return d.toLocaleString("en-US", {
|
||||
return d.toLocaleString("es-ES", {
|
||||
weekday: "short",
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
|
|
@ -43,7 +43,7 @@ export function formatDateTime(isoString: string): string {
|
|||
* Format date for display (e.g., "Mon, Jan 15").
|
||||
*/
|
||||
export function formatDisplayDate(d: Date): string {
|
||||
return d.toLocaleDateString("en-US", { weekday: "short", month: "short", day: "numeric" });
|
||||
return d.toLocaleDateString("es-ES", { weekday: "short", month: "short", day: "numeric" });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue