FidoNet Echomail Archive
genealogy.eur

<<< Previous Index Next >>>

From: Stephen Hayes
To: All
Date: 2004-03-07 03:29:04
Subject: Calendar Notes

[ Part 2 of 2 ]


3.   USEFUL FORMULAE

The reader may find the following rules and formulae to be useful when dealing
with the calendar.

3.1  HISTORICAL RECORDS

When dealing with historical records, wherever the material originated, it is
necessary to exercise great caution before beginning any kind of calculation
based on dates.  It is necessary to know both:

a)   whether the date(s) in question are Julian or Gregorian;  and

b)   if any date is in the range 1st January through 24th March, whether the
     year is regarded as beginning on 1st January or 25th March.

3.2  DIE DOMINI

Die Domini, which may be abbreviated to DD, is suggested to be a useful
concept (rather than a rule).  It is intended to mean "in the day of
the Lord"
- the number of days since the beginning of the christian era.  It allows any
day within the era to be numbered in an unambiguous way for reference or
further calculation.  If this concept is used the day DD 1 should be reckoned
as 1st January AD 1 which is the same day in both Julian and Gregorian
calendars.

DD also provides the most compact form for storage of dates in computer terms
- at the time of writing (AD 1986) less than 725,000 days have elapsed since
1st January AD 1.  Consequently, only six decimal digits are required unless
dates after Sunday Gregorian 27th November AD 2738 (DD 999999) have to be
handled.  In any case 32 bits will store a DD which is beyond any likely
requirement.

The following two sections (3.3 and 3.4) provide mathematical rules to reduce
both Julian and Gregorian dates to DD day-numbers.

3.3  DD FROM GREGORIAN DATES

To convert a date known to be valid and Gregorian to DD carry out the
following steps.

a)   Split the date into separate numbers as follows.

     i)   Let `gdm' = day of month, 1 through 28, 29, 30 or 31.

     ii)  Let `gmn' = month number, 1 = January, 2 = February, etc.

     iii) Let `gyr' = AD year.

b)   Determine whether the year was (is, will be) a leap year, and whether
     29th February for that year has to be included in the count, as follows.

     if   (`gmn' > 2) AND ((`gyr' MOD 400) = 0) OR
          (((`gyr' MOD 100) <> 0) AND ((`gyr' MOD 4) = 0))

     then let DD = 1

     else let DD = 0

c)   Determine how many days were in AD `gyr' prior to the 1st of `gmn' - to
     do this extract `gdp' from the following table.

     `gmn'     Month     `gdp'

       1        Jan         0
       2        Feb        31
       3        Mar        59 (`gly' will deal with leap years)
       4        Apr        90
       5        May       120
       6        Jun       151
       7        Jul       181
       8        Aug       212
       9        Sep       243
       10       Oct       273
       11       Nov       304
       12       Dec       334

d)   Calculate the number of the day in question within its year:

     Let DD = DD + `gdp' + `gdm'

e)   Add the number of days in all previous years of the era as follows.

     i)   Let `y' = `gyr' - 1

     ii)  Let DD = DD + ((`y' DIV 400) * 146097) [days in whole 400-yr cycles]

     iii) Let `y' = `y' MOD 400                  [number of remaining years]

     iv)  Let DD = DD + ((`y' DIV 100) * 36524)  [days in whole centuries]

     v)   Let `y' = `y' MOD 100                  [number of remaining years]

     vi)  Let DD = DD + ((`y' DIV 4) * 1461)     [days in whole 4-year cycles]

     vii) Let DD = DD + ((`y' MOD 4) * 365)      [days in remaining odd years]

f)   DD is then the required Die Domini

3.4  DD FROM JULIAN DATES

To convert a date known to be valid and Julian to DD carry out the following
steps.

a)   Split the date into separate numbers as follows.

     i)   Let `jdm' = day of month, 1 through 28, 29, 30 or 31.

     ii)  Let `jmn' = month number, 1 = January, 2 = February, etc.

     iii) Let `jyr' = AD year modified as follows.

          if   (year begins 25th March) AND
               ((`jmn' < 3) OR ((`jmn' = 3) AND (`jdm' < 25)))

          then let `jyr' = (year recorded in the date being handled) + 1

          else let `jyr' = (year recorded in the date being handled)

b)   Determine whether the year was a leap year, and whether 29th February in
     that year has to be included in the count, as follows.

     if   (`jmn' > 2) AND (`jyr' > 8) AND ((`jyr' MOD 4) = 0)

     then let DD = 1

     else let DD = 0

c)   Determine how many days were in AD `jyr' prior to the 1st of `jmn' - to
     do this extract `jdp' from the following table.

     `jmn'     Month     `jdp'

       1        Jan         0
       2        Feb        31
       3        Mar        59 (`jly' will deal with leap years)
       4        Apr        90
       5        May       120
       6        Jun       151
       7        Jul       181
       8        Aug       212
       9        Sep       243
       10       Oct       273
       11       Nov       304
       12       Dec       334

d)   Calculate the number of the day in question within its year:

     Let DD = DD + `jdp' + `jdm'

e)   Add the number of days in all previous years of the era as follows:

     i)   Let `y' = `jyr' - 1

     ii)  Let DD = DD + ((`y' DIV 4) * 1461)     [days in whole 4-year cycles]

     iii) Let DD = DD + ((`y' MOD 4) * 365)      [days in remaining odd years]

     The resulting number must then be adjusted to take account of the change
     made by Augustus - AD 4 and AD 8 were not leap years in the Julian
     calendar.  Proceed as follows.

     vi)  If `jyr' > 4  [ie. the year in question is AD 5 or later]

          Let DD = DD - 1 and continue ...

     vii) If `jyr' > 5  [ie. the year in question is AD 9 or later]

          Let DD = DD - 1

f)   DD is then the required Die Domini

3.5  GREGORIAN DATE FROM DD

To determine the Gregorian date of any day from its positive DD day-number
carry out the following steps.

a)   Let `x' = DD - 1                            [days in era before this]

b)   Let `gyr' = ((`x' DIV 146097) * 400)        [yrs in whole 400-yr cycles]

c)   Let `x' = `x' MOD 146097                    [remaining number of days]

d)   Let `z' = `x' DIV 36524                     [no. of remaining centuries]

e)   If (`z' = 4) then let `z' = 3               [last day of a leap year]

f)   Let `gyr' = `gyr' + (`z' * 100)             [years in whole centuries]

g)   Let `x' = `x' MOD 36524                     [remaining number of days]

h)   Let `gyr' = `gyr' + ((`x' DIV 1461) * 4)    [years in whole 4-yr cycles]

i)   Let `x' = `x' MOD 1461                      [remaining number of days]

j)   Let `z' = `x' DIV 365                       [number of remaining years]

k)   If (`z' = 4) then let `z' = 3               [last day of a leap year]

l)   Let `gyr' = `gyr' + `z' + 1                 [odd years + 1 for this year]

m)   `gyr' is the required Gregorian AD year-number

n)   Let `x' = (`x' MOD 365) + 1                 [day-number within `gyr']

o)   Determine whether the year `gyr' was (is, will be) a leap year, and
     whether 29th February in that year is included in DD, as follows.

     if   (`x' > 59) AND ((`gyr' MOD 400) = 0) OR
          (((`gyr' MOD 100) <> 0) AND ((`gyr' MOD 4) = 0))

     then let `gly' = 1

     else let `gly' = 0

p)   Search the following table backwards from the end to find the first (ie.
     latest in the year) month for which

     (`x' - `gly') > `gdp'

     `gmn'     Month     `gdp'

       1        Jan         0
       2        Feb        31
       3        Mar        59 (`gly' will deal with leap years)
       4        Apr        90
       5        May       120
       6        Jun       151
       7        Jul       181
       8        Aug       212
       9        Sep       243
       10       Oct       273
       11       Nov       304
       12       Dec       334

p)   `gmn' is the required month

q)   Let `gdm' = `d' - `gdp' - `gly'

r)   If `d' = 60    [ie. the day is the 60th of the year - 

--- WtrGate v0.93.p9 Unreg
 * Origin: Khanya BBS, Pretoria, Gauteng, South Africa (5:7106/20)
SEEN-BY: 633/267 270
@PATH: 7106/20 22 140/1 106/2000 633/267


<<< Previous Index Next >>>