age_years(born, today) returning a person's completed age in years — the subtle part being the birthday check: subtract one if this year's birthday hasn't happened yet. Comparing (month, day) tuples handles it cleanly.age_years(date(2000, 8, 15), date(2026, 7, 28))
25
The August birthday has not arrived by July 28.
Start with today.year - born.year.
Subtract 1 when (today.month, today.day) < (born.month, born.day).