FWIW, by calling Python from Julia we can obtain the number of years, months, days, etc., elapsed between two dates:
using PyCall
datetime = pyimport("datetime")
dateutil = pyimport("dateutil")
relativedelta = pyimport("dateutil.relativedelta")
d1 = datetime.datetime(2022,1,20)
d2 = datetime.datetime(2024,6,1)
dt = dateutil.relativedelta.relativedelta(d2, d1)
# results:
dt.years, dt.months, dt.days, dt.hours, dt.minutes, dt.seconds, dt.microseconds
(2, 4, 12, 0, 0, 0, 0)