fix: tendencia historica muestra todos los anos
This commit is contained in:
parent
09583e1112
commit
bb141390f2
|
|
@ -227,8 +227,8 @@ function loadCurrentMonth() {
|
|||
const yearBusqueda = yearActual;
|
||||
const monthBusqueda = selectedMonth + 1;
|
||||
|
||||
// 1. Primer día del mes (Siempre el 01)
|
||||
const firstDay = `${yearBusqueda}-${String(monthBusqueda).padStart(2, "0")}-01`;
|
||||
// 1. Primer día del mes, retrocediendo 5 años para incluir histórico
|
||||
const firstDay = `${yearBusqueda - 5}-${String(monthBusqueda).padStart(2, "0")}-01`;
|
||||
|
||||
// 2. Calculamos el último día teórico del mes
|
||||
let ultimoDiaObj = new Date(yearBusqueda, monthBusqueda, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue