2021-09-12 Calcular el día de ayer en Vanilla JavaScript 1234567const hoy = new Date();const ayer = new Date(hoy);ayer.setDate(ayer.getDate() - 1);console.log(hoy.toDateString());console.log(ayer.toDateString()); Newer C# throw vs throw ex Older String interpolations