GENBOX-L Archives
Archiver > GENBOX > 2006-05 > 1147835680
From: "William T. Flight" <>
Subject: RE: [GENBOX] Date Ordering
Date: Tue, 16 May 2006 23:14:40 -0400
In-Reply-To: <446A1CDC.40308@blueyonder.co.uk>
Hi Andrew,
Thanks for your questions regarding the sorting of partial event dates.
Sorting of partial event dates involves the partial day/month/year values
supplied by the user, the modifier (such as "about", "before", etc.) that
comes before the date, the class assignments for each of the event types,
and also the fully specified dates of other events for the current user. The
system attempts to order the events that are missing day/month/year values
into a "reasonable" order, based on all these factors.
I'll include a brief description of the current data structure for event
dates in this note. You might want to also download the Genbox Data
Structure document from http://www.genbox.com/developers.htm, although it's
a bit out of date.
There are three fields in the Events table that store date information for
each record: Date, Sort Date, and Estimate. (There is also the field
"sequence", but I don't think it's important for the current situation.)
"Sort Date" is the most basic information: it holds a numeric values in the
form YYYYMMDDC, where YYYY is the year, MM is the month, DD is the day, and
C is a special code value. This field stores user-entered data, both real
dates and sort dates. "Date" can hold the second date of a range or span,
and/or any textual information that isn't parsed by the system, such as in
an entry like "1806 (after the great flood)". "Estimate" holds the
Genbox-generated estimated date, if any; otherwise, it stores the same value
as "Sort Date". The Estimate field is only used internally by the system;
the user does not enter or even see this value.
So, a date of "1 Jan 1900" would be stored in the Sort Date field as
190001012. "1900" is the year; "01" is January; the next "01" is the day;
and "2" is the date code (in this case, it means "nominal".)
Here are the date codes that can appear in the final numerical digit:
DATECODE_BEFORE0
DATECODE_TO1
DATECODE_NOMINAL2
DATECODE_CALC3
DATECODE_EST4
DATECODE_ABOUT5
DATECODE_INT6
DATECODE_BETWEEN7
DATECODE_FROM8
DATECODE_AFTER9
As you can see, this extra code ensures that "before 12 May 1900"
(190005120) will precede "12 May 1900" (190005122), followed by "about/circa
12 May 1900" (190005125) and finally "after 12 May 1900" (190005129).
Note that "between" and "from" date ranges are sorted according to their
first (earliest) date.
Normally, a date of "1900" (190000002) will sort before "Jan 1900"
(190001002), which sorts before "1 Jan 1900" (190001012).
But, all event types are assigned to a class:
EVTCLASS_UNKNOWN0
EVTCLASS_BIRTH1
EVTCLASS_CHILDYOUTH2
EVTCLASS_EDUCATION3
EVTCLASS_FAMILYSTART4
EVTCLASS_FAMILYEND5
EVTCLASS_MATURE6
EVTCLASS_DEATH7
EVTCLASS_BURIAL8
The classes are helpful when the dates themselves are not enough. Consider a
short-lived individual:
"Born 1 Jan 1900"
"Died Jan 1900"
"Buried 1900"
The class assignments on these events are used by Genbox when it generates
its internal estimated dates. They make it possible to get the expected
ordering on these partially-specified event dates, even though the events
otherwise would be in the reverse order.
----------
Now we come to your sorting problem:
Baptism 2 Jan 1900
Birth 1900
Birth Reg 3 Jan 1900
In your case, you have two events both in the "Birth" class for the same
individual(Birth and "Birth Reg"). Also, you have a fully-specified
Child/Youth event (Baptism 2 Jan 1900) that occurs before a fully-specified
birth event (Birth Reg 3 Jan 1900), which is supposed to come first, of
course.
My guess is that the estimation routine is not prepared to return
"reasonable" sort ordering when there are event types of higher classes
appearing before birth class types. The "birth" class is really intended for
"life-starting" events. I think you will have better luck by putting "Birth
Reg" in the "child/youth" class, particularly if you plan to enter event
data of both types on the same individual.
I hope this note helps answer your questions.
Best regards,
--Bill
William T. Flight
http://www.thoughtfulcreations.com
> -----Original Message-----
> From: Andrew Hough [mailto:]
> Sent: Tuesday, May 16, 2006 2:42 PM
> To:
This thread:
| RE: [GENBOX] Date Ordering by "William T. Flight" <> |