I am new to js.
Here, I have two durations . one is start and second is end duration . Now, What I want to do is that if start duration is greater than end then it should give a message and vice versa.
My logic is like -
var stDate = new Date(start_duration_month);
var enDate = new Date(end_duration_month);
var final_Date = enDate - stDate;
if(final_Date > 0) {var duration_message = true;}
Now here stDate is -> Sat May 01 1999 00:00:00 GMT+0530 (IST)
enDate is --> Tue May 01 2018 00:00:00 GMT+0530 (IST)
Now Due to this, I am able to get to know that there is something wrong as it will give -value
. But Now I want to know which one is not proper whether it is start or end So, How will I come to know this ?