I have 2 person's birth information, I want to do some analysis on them. Like, the difference between their age, seconds, years+months+days. I tried this:
from datetime import date
a = date(1991, 07, 20)
b = date(1999, 06, 06)
print((a-b).days)
-2878
this gives me 2878
days, but i want to calculate years + months + days
i tried to divide 2878/365, but i want the exact calculations
How can i approach this?
Expected Output:
7 years x months x days