[Mono-list] Hebrew Calendar

Atsushi Eno atsushi at ximian.com
Mon Mar 20 01:53:27 EST 2006


Hello,

Lately I was looking at bug #76252 which is about HebrewCalendar.
I think I found the source of the bug, but also found that it is
pretty complex for me to understand the whole correct things...
so if anyone familiar with Hebrew Calendar could fix it, I'd be
so grateful.

The source of the problem I think is in CCHebrewCalendar class in
mcs/class/System.Globalization/CalendralCalculations.cs.
CCHebrewCalendar.fixed_from_dmy() expects that for Hebrew month
under 7 it needs to add days of from 8th month to 12th or 13th month.
I think it could be either 7 or 8.

However, if I rewrite this method as to do that, it causes infinite
loop since last_day_of_month() internally calls long_heshvan() and
short_kislev(). They both internally call days_in_year() which calls
fixed_from_dmy() - and thus it causes infinite loop.

As long as I wikipedia it, the formula to compute days in Kislev
and Cheshvan (Heshvan) is pretty complex. It should not be like
current code which determines the number of days in chicken-and-egg
computation.
http://en.wikipedia.org/wiki/Hebrew_calendar

Atsushi Eno


More information about the Mono-list mailing list