Jak sprawdzić, czy data minęła JavaScript
dateInPastArrow = (firstDate, secondDate) =>
firstDate.setHours(0, 0, 0, 0) <= secondDate.setHours(0, 0, 0, 0);
console.log(dateInPastArrow(past, today));
console.log(dateInPastArrow(future, today));
Glamorous Goose