Below are several E-mails about this topic.

(original email was slightly edited)

Dear Calendar People

I discovered an simple algorithm for calculation the night number of a given Julian day (JD) in my Yerm calendar. It is so simple, it can be done on a calculator.

For this algorithm and indeed that one in my note of 19th May 1998 (Re: Yerm Rule Based Calendar) shown further below, fractional JDs are rounded DOWN. If the JD you wish to convert was obtained from a source that rounds to the NEAREST whole number the result will be the night beginning noon of that day.

To obtain the night of the yerm month from the JD

1) subtract the JD of the most recent occurrence of Night 1 Month 17 Yerm 2 [ 02(17(01 ]. They can be listed

```
JD#s of 02(17(01
2451373 1999-07-13
2426272 1930-10-22
2402271 1862-01-30
2376070 1793-05-10
```

which can easily be extended by adding or subtracting 25101.
(2) multiply this number by 850 (number of months in Yerm cycle)

(3) divide it by 25101 (number of days in Yerm cycle) and take the remainder.

(4) divide it by 850 and take the quotient

(5) add one to get the night number.

Below are some examples

```
Date PM 25 Feb 1999
JD 2451235
02(12(10
1) 2451235 - 2426270 = 24963
2) 24963*850 = 21218550
3) 21218550 mod 25101 = 8205
4) 8205/850 = 9
5) 9+1 = 10
Date PM 11 Nov 1996
JD 2450399
01(01(01
1) 2450399 - 2426272 = 24127
2) 24127*850 = 20507950
3) 20507950 mod 25101 = 433
4) 433/850 = 0
5) 0+1 = 1
Date PM 11 Nov 2000
JD 2451860
04(01(15
1) 2451860 - 2451373 = 487
2) 487*850 = 413950
3) 413950 mod 25101 = 12334
4) 12334/850 = 14
5) 14+1 = 15
```

To compare with eclipses and other dark moons, it would be useful to know if a given JD is the last night of a Yerm Month. To do this use 02(16(29 instead of 02(17(01 in step 1 and do not add the one in step 5. Then 0 will indicate last night of month.
To prove the correctness of this algorithm, I suggest studying the remainder from step 4.

Karl Palmen

Night 10 Month 12 Yerm 2

(original email was slightly edited)

At 14:16 18-05-98 +0500, Lance Latham wrote:

>Karl-

>

>I finally got a few minutes on Friday to convert the calculator

>procedures that you suggested for the 'yerm' calendar (JD# to date)

>into C code, and play a bit.

>

>I did not find any description of a value for the constant to be

>added to and subtracted from the JD#. Using zero for that constant

>does not, of course, produce results which bear the remotest resemblance to the

>'yerm' dates you supplied as equivalents to the selected 4 JD#s that we

>discussed.

>

>If you can give me an idea of what value(s) you are using for that

>constant, I will poke around this some more.

Since you addressed your note to CALNDR-L

I shall quote the algorithm that this constant belongs to so

others understand what we are on about.

I haven't tried it out myself so it may not be bug free.

A program converting JD to Yerm Calendar could go somthing like this.

day = JD + YERM_CAL_FIX;

day = day % 25101

yerm = 1 + 3*divide( &day, 1447 );

yerm = yerm + divide( &day, 502 );

month = 1 + 2*divide( &day, 59 );

month = month + divide( &day, 30 );

week = 1 + divide( &day, 7 );

day = 1 + day;

where divide(&a, b) returns the quotient 'a/b' and replaces 'a' with the remainder.

The yerm calendar has the property that any period of a given level is a prefix of any other period of that level or vice-versa (ie, one can be changed to the other by removing an ending). All calendars with property can be converted with an algorithm like the one above.

The Julian and Gregorian calendars do not have this property, but would if the new year were to begin on March 1 and days of the week were ignored.

Conversion to JD is complicated by the fact that the yerm calendar does not have an era (eg, a count of 52 yerm cycles). To enable such conversion a Julian day can be added as a parameter to make the result the next occurrence of the Yerm date after or on the given julian day (jd0), which must not be too low.

jd = - YERM_CAL_FIX;

yerm = yerm-1;

jd = jd + (yerm/3)*1447 + yerm%3 * 502;

month = month-1;

jd = jd + (month/2)*59 + month%2 * 30;

week = week-1;

jd = jd + 7*week;

jd = jd + day - 1;

while( jd < jd0) jd = jd + 25101;

The constant you are referring to is YERM_CAL_FIX.

I thought you would be able to work this one out. Any positive value that gives the November 11 1996 (JD 2450399) as the date Yerm 1 begins will do.

The JD conversion I got from http://genealogy.org/~scottlee/calconvert.cgi and is correct for the first date of Yerm 1, if conversion is afternoon (Both Julian dates and Yerm dates begin at noon).

Each 850 month 52 yerm cycle has 25101 days. So I'd subtract 2450399 from 2510100 to give a value of 59701 for YERM_CAL_FIX, which is correct subject to the above assumption.

You could subtract 25101 from this to get 34600 or again to get 9499.

One interesting discovery from this is that JD 0 was 2/3 of the way through a lunar month.

Karl Palmen

Essays on mathematical themes

Copyright 1998, Lance Latham and Karl Palmen, (contact info).
* © HTML Copyright 1998, Mario Hilgemeier, email: contact
homepage
*