how to find the month difference between two dates counting last date of month using javascript or jQuery.
ex:
01/03/2015 - 31/03/2015 - Month: 1
01/03/2015 - 30/03/2015 - Month: 0
how to find the month difference between two dates counting last date of month using javascript or jQuery.
ex:
01/03/2015 - 31/03/2015 - Month: 1
01/03/2015 - 30/03/2015 - Month: 0
Use javascript Date:getMonth()
method:
Date startDate = "01/03/2015";
var startMonth = startDate.getMonth();
Further info here