I am calculating the age of a kid based on Birthday.
This is the code as it is. It works. I strongly suspect this is not a good way of doing this. Currently, the code in is the view and I do plan to move it to a helper eventually. That is not relevant.
TLDR; User suspects the code below is brittle and will lead to future issues (such as leap year birthdays?). Please advise.
<%= ((Date.today - children.child_birthday).to_i)/365 %>