[Mono-dev] Hebrew Calendar

Yaacov Akiba Slama ya at slamail.org
Mon Mar 20 18:59:40 EST 2006

Hello Atsushi,

The enclosed patch seems to fix the bug.

You can use the link : http://www.abdicate.net/print.aspx?sdn=2453265 to 
compare with the results of the program enclosed in 


Atsushi Eno wrote:
> 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
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hebrewcalendar.diff
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060321/21ba4f06/attachment.pl 

More information about the Mono-devel-list mailing list