I want to get the number of months between two dates with JavaScript, but if the number of days greater than 30 days or greater than 1 month then it directly return me two months.
For example if my from date is 17/01/2011 and to date is 20/02/2011 then my function returns two months because then days between two days exceeds one month.
Hope you all understand.