I when back and redid the line of code like this. Now it makes a little more sense.
dif= ((tm<inp) || (tm == Number(inp)&& td<Number(inp)))? dif-1 : dif;
Lets see if I can explain it and you let me know if I'm right.
dif is the number of years between the two date objects. The conditional statement will check if the value of dif needs to be change by -1 or not.
It will subtract 1 if today's month is less than the input month.
Or it will subtract 1 if today's month is equal to the input month and today's day of the month is less than the input's day of the month.
I'm guessing that the Number() is just making sure that a number is being compared?
How did I do?
Well it is time to go eat some turkey.
Happy Thanksgiving to all.