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));