-
Notifications
You must be signed in to change notification settings - Fork 424
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
Remove rounding when formatting a span #1301
Remove rounding when formatting a span #1301
Conversation
Removes the +1 when the Age precision is set to 1 (Years) and the month is >= 6 Bug #0012422
This proposed fix reverts the change made for bug #8765. The issue is that when calculating the length of a span, "about 1900" is taken as "1 Jan 1900" instead of a mid-point. This leads to the span "May 1900" to "about 1901" being displayed as "0 years" instead of "1 year" which may appear more reasonable. |
I just did a test Birth = "May 1900" about defined with default 50 years Years = about 8 months PR 1301 applied Years = about 8 months With PR 1301 still applied Birth = "May 1900" Years = about 49 years All correct calculations But going back to to my exact date scenario, with PR1301 not applied Date of Birth: 1909-12-12 Age: 83y, 10m, 22d My relative was not 84 when she died. |
The argument made in the original bug report (#8765) was that an incomplete date such as "1900" was on average more likely to represent an event happening nearer to 1 Jul 1900 than 1 Jan 1900. The fix caused other issues though. With two exact dates the age is rounded up which is unexpected in some countries. In England, using the example above, we would refer to a person as 83 years old even if they had lived for 83y, 10m, 22d. However, this may not be the case in all countries, so perhaps we should make this an option as @SNoiraud suggests in bug report #12422. |
Personally, I use Year, Month, Day as my setting but I did notice it was rounding up when I first migrated to Gramps. Odd that the setting in Preferences is "Age display precision:" I have no strong opinion that the code needs to be changed. If you (and/or others) feel this pull should be closed, I will not be disappointed. |
In general, rounding a span seems like a good idea. When the span represents an age, then rounding may not be appropriate and perhaps should be made optional. I'll leave this open for now and think about it further. |
Removes the +1 when the Age precision is set to 1 (Years) and the month is >= 6
Bug #12422