I need to compare the startDate and endDate and if startDate>endDate
then i need to take the starting date of the month of endDate as startDate suppose my
startDate is "startDate": "2016-05-30T00:00:00.000Z"
endDate is "endDate": "2016-06-05T00:00:00.000Z"
then when compare need to get true
but i am getting false
Code:
var c=(new Date(nestedObj.startDate)).getDate();
console.log("startdate"+" "+c);
var d=(new Date(nestedObj.endDate)).getDate();
console.log("endtdate"+" "+d);
console.log(c>d);
As you can see in the below snippet
Any help would be appreciated.