Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

como saber si un afecha es mayor o menor js

let date1 = new Date(2019, 08, 07, 11, 45, 55); 
let date2 = new Date(2019, 08, 03, 11, 45, 55); 
if (date1.getTime() < date2.getTime()) 
  document.write("date1 is lesser than date2"); 
else if (date1.getTime() > date2.getTime()) 
  document.write("date1 is greater than date2"); 
else
  document.write("both are equal"); 
 
PREVIOUS NEXT
Tagged: #como #saber #si #afecha #es #mayor #menor #js
ADD COMMENT
Topic
Name
3+9 =