Days, weeks or months between two dates
Calculate the number of days, weeks, and months between any two dates.
days = "to" date − "from" date · months ≈ days ÷ 30.4375 (the average month length)
Why does the "months" figure look uneven?
Months are calculated using an average month length of 30.4375 days, since calendar months vary from 28 to 31 days. For an exact whole-month count, use the days or weeks figure instead.
What if the "to" date is before the "from" date?
The result is negative, showing how many days earlier the "to" date is — swap the two dates if you'd rather see a positive count.