a few small fixes
This commit is contained in:
parent
f6c552cefd
commit
8503c760dc
8 changed files with 157 additions and 55 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue