Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check date greater than today

function isDateInFuture(date) {
    return date > Date.now()
}

console.log(isDateInFuture(new Date("2025-01-01")) //true
console.log(isDateInFuture(new Date("2000-03-11")) //false
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #check #date #greater #today
ADD COMMENT
Topic
Name
6+7 =