TMG-L Archives
Archiver > TMG > 2003-05 > 1052927319
From: "Richard Damon" <>
Subject: RE: [TMG] Problem with early dates
Date: Wed, 14 May 2003 11:48:39 -0400
In-Reply-To: <1052785751.8813.12.camel@localhost.localdomain>
Since TMG does not store dates as binary numbers, the minus sign would
not work. A (simplified) description for the format may help. Dates are
stored as string of characters as follows
RYYYYMMDD....
Where R is 0 for irregular dates (and is followed by the literal date
given) and 1 for regular dates. YYYY is the text representation of the
year, MM the text representation of the number of the month, DD the text
representation of the day. This is followed by more fields to handle all
the various modifiers. This format allows for partial dates by allowing
the corresponding field to be blank. To allow for BC dates it would just
be needed to change the encoding of R to be 0 = Irregular, 1 = BC, 2 =
AD. To make BC dates sort properly it would then be required that BC
years be stored 9's complement (store the value of 9999-year) so larger
years BC sort before smaller years.
This could be extended even farther to support other calendars like the
Jewish, Muslim or Chinese calendars by assigning these other values of
R. To fully support these other calendars TMG should probably translate
the sort dates to a common calendar for comparison (other wise if R=3
for Jewish dates ALL jewish dates fall after Gregorian dates, with R=2).
Richard Damon
--
,.com (Home)
(Work)
(Genealogy)
-----Original Message-----
From: Gordon Banks [mailto:]
Sent: Monday, May 12, 2003 8:29 PM
To:
Subject: Re: [TMG] Problem with early dates
I wonder what it would take to make the BC dates regular. Why not just
accept a minus sign in front of the date? Whatever arithmetic functions
are used to do the calculations in TMG should still work with negative
integers. You then are left only with the problem that there is no year
0.
This thread:
| RE: [TMG] Problem with early dates by "Richard Damon" <> |