-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Age is not correct in Birthday Calendar. #6990 #6997
Conversation
I have confirmed the issue, oddly this PR does not fix the issue for me. Needs further investigation. |
Okay, this is more complicated than it first appeared. On the calendar you want the age they are going to become, in the year of the calendar view (so not now). On their profile you want the age they currently are, on the day you look at the profile (so now). It seems to be relying on the same code, but needs different results. The calendar view needs to subtracts the calendar view year from the date of birth year, e.g.: 2024 - 2012 The profile using date_diff only clocks over at the end of the day, so if the birthday is today it will show the year 1 less than you would expect. So that needs to be tweaked to, but you only want that to happen on the day. |
Okay, it looks good to me. Found a few other bugs, but that's not due to this PR. This one fixes what it says it does. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, and passed my testing.
Description & Issue number it closes
Bug: Age is not correct in Birthday Calendar. #6990
Use same date function used in Person::getBirthDate() to create calendar date
Screenshots (if appropriate)
Before

After

How to test the changes?
http://localhost/v2/calendar
Type of change
How Has This Been Tested?
From local host with
Checklist: