a few small fixes

This commit is contained in:
counterweight 2025-12-26 19:00:56 +01:00
parent f6c552cefd
commit 8503c760dc
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
8 changed files with 157 additions and 55 deletions

View file

@ -27,9 +27,9 @@ export function formatTime(isoString: string): string {
/**
* Format datetime from ISO string to a readable format in local timezone.
*/
export function formatDateTime(isoString: string): string {
export function formatDateTime(isoString: string, locale: string = "es-ES"): string {
const d = new Date(isoString);
return d.toLocaleString("es-ES", {
return d.toLocaleString(locale, {
weekday: "short",
month: "short",
day: "numeric",