Corregir desajuste de zona horaria usando fecha local getLocalToday en lugar de UTC ISO
This commit is contained in:
@@ -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() || '';
|
||||
|
||||
Reference in New Issue
Block a user