test262 icon indicating copy to clipboard operation
test262 copied to clipboard

Allow different approximations in the observational Islamic calendar

Open anba opened this issue 1 year ago • 3 comments

The "islamic" calendar id refers to the observational Islamic calendar and different implementation may use different algorithms to approximate when the moon's crescent can be observed. Change the test data to allow the approximations used in ICU4X in addition to the ones used in ICU4C.

Additionally allow implementations to canonicalise the calendar id.

anba avatar May 30 '24 08:05 anba

How soon would it be possible to determine whether ICU4C or ICU4X's calculation is correct? I mean, this is a date in the past, so there should be one correct answer to the question "what was the Gregorian date on 1 Muharram 1445?" for each one of the supported astronomical Islamic calendars. In other words, when results from ICU4C and ICU4X differ for dates that have already happened, at least one of them is objectively wrong.

If it's not feasible in the short term to determine which is correct, then sure, we could adopt this as a temporary measure to avoid cluttering test failure results with something that is not directly relevant to whether ECMA-402 is implemented correctly. I wouldn't want to keep it permanently though.

ptomato avatar Jul 10 '24 17:07 ptomato

This is possibly caused by https://github.com/unicode-org/icu4x/issues/4982.

From https://en.wikipedia.org/wiki/Hijrah#Aftermath_and_legacy:

Burnaby states that: "Historians in general assert that Muhammad fled from Mecca at the commencement of the third month of the Arabian year, Rabi 'u-l-awwal. They do not agree as to the precise day. According to Ibn-Ishak, it was on the first or second day of the month;"

Which is an excerpt from https://archive.org/details/elementsofjewish00burnuoft. Part II, Chapter 1.6, starting on p. 371 has more details: https://archive.org/details/elementsofjewish00burnuoft/elementsofjewish00burnuoft/page/370/mode/2up

anba avatar Jul 10 '24 19:07 anba

Subscribed to that issue, thanks.

ptomato avatar Jul 10 '24 20:07 ptomato

I guess there's been no movement on the ICU4X issue in 6 months, so it makes sense to support both calculations for now.

ptomato avatar Jan 31 '25 01:01 ptomato