Login to participate
Register   Lost ID/password?
Louis Kessler's Behold Blog » Blog Entry           prev Prev   Next next

Getting Ages Right - Sun, 26 Feb 2012

Determining people’s ages at events is fun. For me, it’s again grassroots. I have to add low-level code and think though logic and develop algorithms to do it.

Why not just subtract one internal date from another? It’s not quite that simple. You have to figure out date ranges. Then you have to subtract the date ranges to get minimum and maximum ages.

For example. If someone was born in 1860, then the date range was from January 1, 1860 to December 31, 1860. If an event happened in 1920, they could have been either 60 or 61 years old at the time of the event, depending on whether it happened before or after their birthday.

This may seem to be an unimportant detail, but it is important to help you verify that the data is correct and can help you narrow down more precise dates. So my adding of ages to Behold will help you identify problems and show you this, for example:

Birth: 1860
Death: June 1921, age 61 to 62.

If you know your grandfather died at age 61, then his birthday must have been in June or later of 1860 and you can update your data to:

Birth: from June 1860 to Dec 1860
Death: June 1921, age 61.

Handling the ages right means handling date ranges such as the “from … to” expression. It means handling approximate ages with the “about” or “est” prefix (in which case I add +/- one year to the maximum and minimum dates). It means handling one sided dates with the “before” or “after” prefix. It means handling period less than a year (which Behold will show as months “7m” or days “23d”). And it means handling negative dates, when the event preceeds the birth, or when errors are made, e.g.

Birth: from June 1860 to Dec 1860
Death: June 1821, age -39. **Event prior to birth**

and I’m adding on messages into the Everything Report following the age to make problems easy to find.

This checking has to be smart about the event types. Some events like burial and cremation should only happen after death. Most other events should only happen between birth and death. Some events, such as birth of a child or marriage should not take place until some “age of maturity”, e.g. 13, has been reached. Together, this age checking done this way should be quite encompassing, but as simple as can be. With the messages right next to the problem, it will be a joy (once editing is added in Version 2) to simply fix the problems right then and there.

This work to implement ages is almost completed and seems to work very well. It will be in the next release of Behold which may be in a week or two. I’m sure you’ll like the extra insight it gives into your relatives, and it may point out a number of data problems that had previously escaped you.

3 Comments           comments Leave a Comment

1. Brett (brett)
Australia flag
Joined: Mon, 12 Jan 2009
36 blog comments, 59 forum posts
Posted: Sun, 26 Feb 2012  Permalink

Showing the age variation would certainly be an improvement on most progams, which show as:

Birth: 1860
Death: June 1921
Age: ~ 61 years

2. meliasz (meliasz)
United States flag
Joined: Fri, 24 Feb 2012
3 blog comments, 0 forum posts
Posted: Sat, 3 Mar 2012  Permalink

I like your ideas Louis. Will you be able to override too (make it store the date any way)? Every once in a while I need to enter a date that does not seem to make sense (and go back and fix the other prior dates).

3. Louis Kessler (lkessler)
Canada flag
Joined: Sun, 9 Mar 2003
237 blog comments, 226 forum posts
Posted: Sat, 3 Mar 2012  Permalink


You’ll be able to store whatever dates you want. If the person’s death date is input as 100 years before their birth date, then so be it - but Behold will by default show the warning to remind you, so you won’t forget to fix it later.


Leave a Comment

You must login to comment.

Login to participate
Register   Lost ID/password?