Bug 21930 - UmAlQuraCalendar fundamentally broken
Summary: UmAlQuraCalendar fundamentally broken
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 3.4.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: marcos.henrich
Depends on:
Reported: 2014-08-07 15:42 UTC by Jon Skeet
Modified: 2014-09-11 08:20 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Console app to demonstrate brokenness (595 bytes, text/plain)
2014-08-07 15:42 UTC, Jon Skeet

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jon Skeet 2014-08-07 15:42:03 UTC
Created attachment 7627 [details]
Console app to demonstrate brokenness

(Seen against 3.6.0 on my Mac and 3.3.0 on my Windows box.)

I'm slightly surprised that Mono even claims to support the Um Al Qura calendar given that it's documented to require data licensed from the Saudi government, but it does. Unfortunately, it doesn't work.

The MS implementation only supports a very small range of years (183 at the moment) whereas Mono *claims* to support most of the range of DateTime (622-9999). However, it's not even internally consistent.

The attached test program shows the number of days in year 2 via a) calling GetDaysInYear; b) calling GetDaysInMonth for all the months and summing the results. The two values differ.

I don't mind the calendar not being supported - I'd just prefer it if it didn't *pretend* to supported.
Comment 2 Marek Safar 2014-08-12 04:48:53 UTC
I think Um Al Qura calendar does not necessary need Saudi government permission. It's only that Microsoft uses "old" table based (observed) data instead of Tabular Islamic calendar.

That still does not mean we are not buggy
Comment 3 marcos.henrich 2014-09-11 08:06:31 UTC
Hi Jon,

Thank you for the detailed bug report.

The pull request for this issue can be found in the link below.
Comment 4 marcos.henrich 2014-09-11 08:20:12 UTC
Fixed in master b946785022acf83db313daf08ae6b5f211dac0e5.