moment/moment — pull request #2133 by ichernev (2014-12-29 11:28:44+00:00)
Title: Reimplement month diff logic

The new algorithm to compute month differences between two moments (used in
`diff(a, 'month|quarter|year')`), is as follows:
- take the whole number of months between the two dates (ignoring day-of-month
and hour) -- `wholeMonthDiff`
- the above is adjusted linearly by how much the second date is away from the
whole-month-diff-date (the date where the result would be exactly
`wholeMonthDiff`)

This algorithm makes sure that dates that are exact number of months apart
would return whole numbers (like previous algorithm), but also fixes a few edge
cases that the old agorithm failed to do, like when the first moment is close
to the end of a long month and the second moment was in the begining of a short
month (end of Jan to begining of Feb for example).

Fixes #2026