Function DifDate$(début As Date, fin As Date)
Dim D As Date, f As Date, M&, j&
If début < fin Then D = début: f = fin + 1 Else D = fin: f = début + 1
Do While DecMois(D, M + 1) < f: M = M + 1: Loop
D = DateSerial(Year(DecMois(D, M)), Month(DecMois(D, M)), Day(DecMois(D, M)))
j = f - D - 1
DifDate = M \ 12 & " an" & IIf(M \ 12 > 1, "s, ", ", ") & M Mod 12 & " mois et " & j & " jour" & IIf(j > 1, "s.", ".")
End Function
Function DecMois(D As Date, dec&) As Date
Dim x, y
x = DateSerial(Year(D), Month(D) + dec, 1)
y = Day(DateSerial(Year(x), Month(x) + 1, 0))
DecMois = DateSerial(Year(D), Month(D) + dec, (y + Day(D) - Abs(y - Day(D))) / 2)
End Function