Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript compare dates

let d1 = new Date();
let d2 = new Date();
// can use >, <, <=, <=
d1 > d2
d1 >= d2
// == won't work so can use this:
(d1 >= d2) && (d2 >= d1)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #compare #dates
ADD COMMENT
Topic
Name
1+7 =