Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check if a date has passed 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));
Source by daily-dev-tips.com #
 
PREVIOUS NEXT
Tagged: #check #date #passed #javascript
ADD COMMENT
Topic
Name
6+4 =