Birthday age routines

I just noticed while entering Fred Williard’s death…R.I.P Fred, into my birthday database that my age routine works better than Wikipedia’s…at least as of today. He was born 9/18/39 and died 5/15/2020. They have him listed as 81 (which he won’t be for 4 more months, looks like they did a simple year subtraction) I have him listed as 80. It was simple PHP code, if I’m reading my own program correctly (it’s a little hard to follow, TBH because it was an early PHP program, and I could have used comments better!) that may not itself be exact. Today I’d guess that there is probably a PHP function that calculates it exactly. I also remember coming up with a way, that I was proud of at the time, in SQLite to give me that date using SQL only, because I wanted it from the command line.