In what units do you want the difference?
The code you have here computes the differences between the day in month of two dates...
For instance the difference between the 11/02/2014 and the 14/05/2015 will be 3...
What you may want is the actual difference, which is 1 year 4 months and 3 days...
What you have is to compute the difference in the smallest unit we have in data object - milliseconds...You are lucky as simple subtraction will do it for you...
var v1 = new Date('February 11, 2014');
var v2 = new Date('May 14, 2015');
var d = v2 - v1;
Now d has the value of 39481200000, which is the difference between the two dates in milliseconds...
To convert it to a date you can use this:
var date = new Date(d);
Now the only problem is that data is a point-in-time vale where you need difference between two points...The solution is to know what the base for that point-in-time - it is 1st of January 1970...
So you can see the difference as year-month-day using this code:
date.getFullYear() - 1970);
date.getMonth() + 1);
date.getDate());
for a working demo see here:
http://jsfiddle.net/nbjeqmo5/[
^]