Javascript examples for Date Operation:Date Compare
Comparing two dates
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){// ww w . j a v a2s . c o m var date1 = new Date(2018, 3, 3) var date2 = new Date(2018, 3, 3) console.log(date1) console.log(date2) console.log(date1 == date2) } </script> </head> <body> </body> </html>