## gramps-devel

 Fwd: Re: [Gramps-devel] Function for getting persons age? From: - 2004-09-14 08:06:57 ```--- Don Allingham wrote: > Well, its not as easy as that. The problem is that genealogy dates > are typically fairly ambiguous. That makes math a bit more difficult. > > Birth = between January 2, 1892 and January 28,1892 > Death = estimated after 1945 > Death - Birth = ? Granted. This is one of a number of similar possibilities, which would make for quite a few exceptions. > As any engineer or scientist will tell you, you cannot subtract > numbers of lower precision to get a number of higher precision. Indeed. > Even if you have accurate dates, when you subtract, you can really > only get an accurate number of days. Trying to convert number of days > into an accurate month/day/year count can get pretty ugly, especially > when you move to alternate calendars. All months are not 30 days, > all years are not 365 days. I just realized it becomes greatly simplified if merely the years are considered and it requires far fewer functions too. Granted there's still the issue of the localization (eg "double dates", re: calendar transition) and it still requires quite a bit of parsing, but may be even plausible. _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com ```
 Re: Fwd: Re: [Gramps-devel] Function for getting persons age? From: Eero Tamminen - 2004-09-14 19:37:11 ```Hi, On Tuesday 14 September 2004 11:06, linux_user98765@... wrote: > --- Don Allingham wrote: > > Well, its not as easy as that. The problem is that genealogy dates > > are typically fairly ambiguous. That makes math a bit more difficult. > > > > Birth = between January 2, 1892 and January 28,1892 > > Death = estimated after 1945 > > Death - Birth = ? > > Granted. This is one of a number of similar possibilities, which > would make for quite a few exceptions. > > > As any engineer or scientist will tell you, you cannot subtract > > numbers of lower precision to get a number of higher precision. > > Indeed. > > > Even if you have accurate dates, when you subtract, you can really > > only get an accurate number of days. Trying to convert number of days > > into an accurate month/day/year count can get pretty ugly, especially > > when you move to alternate calendars. All months are not 30 days, > > all years are not 365 days. > > I just realized it becomes greatly simplified if merely the years are > considered and it requires far fewer functions too. Granted there's > still the issue of the localization (eg "double dates", re: calendar > transition) and it still requires quite a bit of parsing, but may be > even plausible. For me just years would be completely satisfactory. I was thinking that people with a lot of genealogy information would like e.g. distribution of first child bearing ages for people born between certain years when they output the genealogy book reports. The genealogy information itself may be a bit monotonous if you have thousands of a people and I thought a couple of nice charts might liven it up a bit. :-)) I'm doing this as an excercise on getting to know how Gramps reports work before starting to re-factor relationship chart code (currently I find it a bit hard to comprehend)... - Eero ```