I'm implementing support for the Hebrew calendar in Noda Time, my date/time library for .NET. I think I'm mostly there aside from text support (although beta testers would be very welcome!) but one aspect still puzzles me.
The Wikipedia Hebrew Calendar entry states that in a leap year, the extra month is inserted before the "regular" Adar:
During leap years Adar I (or Adar Aleph — "first Adar") is added before the regular Adar. Adar I is actually considered to be the extra month, and has 30 days. Adar II (or Adar Bet — "second Adar") is the "real" Adar, and has the usual 29 days. For this reason, holidays such as Purim are observed in Adar II, not Adar I.
So according to this, Adar I is the leap month. However, the Microsoft method of
true for year 5502, month 7 - which is Adar II (using civil month numbering instead of ecclesiastical). By my reckoning, it should return
true for month 6 instead of month 7.
This is also the way Microsoft handles Adar in Windows Store applications. From
During leap years, Adar is replaced by Adar Alef with 30 days and Adar Beit with 29 days. Adar Beit is considered the leap month. The last day of Adar Alef and all the days in Adar Beit are considered leap days.
Currently this doesn't impact my implementation, but I can see that it might in the future - and I'd rather get things right than just follow Microsoft if they've got it wrong. So, who's right in this case? And does it have impact beyond that mentioned in Wikipedia?