I've found an interesting answer on StackOverflow when it comes to calculating someone's age based on that person's date of birth and the date at which the age is calculated. The calculation is something like this:
$A_{fraction} = \frac{\Delta Y\cdot{10^4} + \Delta M\cdot{10^2} + \Delta D}{10^4}$ $\iff A=\left \lfloor A_{fraction} \right \rfloor$
With $A$ being the age and where $\Delta Y$ is the difference in years, $\Delta M$ is the difference in months and $\Delta D$ is the difference in days between the two dates.
I tried to extend this idea of taking differences up to smaller time intervals, so I went down to the millisecond like so:
$A_{fraction} = \frac{\Delta Y\cdot{10^{13} + \Delta M\cdot{10^{11} + \Delta D\cdot{10^9} + \Delta H\cdot{10^7} + \Delta m\cdot{10^5} + \Delta s\cdot{10^3} + \Delta \mu}}}{10^{13}}$
But instead of rounding the age down, I decided to keep its fractional part and plot it against various dates of birth, and this happened:
Plot of the results of the fractional age calculation for $10^4$ equally spaced dates between 17 December 1993 and 8 March 2021. raw data
Which seemed rather counter-intuitive to me. I expected that a graph with steps would arise from the floored age calculation, but I thought the more granular fractional age calculation would show something closer to a straight line. It doesn't seem like it has something to do with leap years, because it steps down annually instead of every four years.
So, here's my question: is it possible to find a formula that can linearly map a date of birth (e.g. 17 December 1993) when calculated at a particular date (e.g. 8 March 2021) to its corresponding age ($\approx 27$)?
Barry's formula visualized
Graph for $A = \Delta Y + \frac{\Delta M}{12} + \frac{\Delta D}{30}$
Same graph but zoomed between (January 1994 and July 1996)


