1

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
Mani David
  • 1,382
  • 1
  • 14
  • 30

1 Answers1

0

Use javascript Date:getMonth() method:

Date startDate = "01/03/2015";
var startMonth = startDate.getMonth(); 

Further info here

Jordi Castilla
  • 26,609
  • 8
  • 70
  • 109