comparing 2 dates with javascript -


i want compare 2 dates in following format shown below in variables a , b . want check if a greater b code below isnt working since not regular number

var = "4/29/2015"; var b = "4/10/2015";  if(a > b){ alert("working"); } 

convert strings date objects.

var = new date("4/29/2015");  var b = new date("4/10/2015");    if (a > b) {    console.log(a + " greater " + b);  }


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -