Monday, 24 February 2020

JavaScript date : How to compare two dates to check which one is greater?


Example:

if(startDate.getTime() == endDate.getTime()) //both the dates are same
{
            //do something
}

No comments:

Post a Comment