Corregir desajuste de zona horaria usando fecha local getLocalToday en lugar de UTC ISO

This commit is contained in:
2026-08-12 02:55:20 +00:00
parent e405ff7a82
commit d49250460b
8 changed files with 58 additions and 49 deletions
+8
View File
@@ -14,6 +14,14 @@ export function formatDateDDMMYYYY(dateString: string): string {
return `${day}-${month}-${year}`;
}
export function getLocalToday(): string {
const d = new Date();
const year = d.getFullYear();
const month = String(d.getMonth() + 1).padStart(2, '0');
const day = String(d.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
}
export function getNombreProfesional(user?: Usuario | null): string {
if (!user) return 'Admin';
const apellido = user.apellido?.trim() || '';