Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow different approximations in the observational Islamic calendar #4101

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anba
Copy link
Contributor

@anba anba commented May 30, 2024

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 anba requested review from a team as code owners May 30, 2024 08:40
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.
@anba anba force-pushed the temporal-staging-islamic branch from ae4cb32 to b98456b Compare July 10, 2024 13:42
Copy link
Contributor

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable

@ptomato
Copy link
Contributor

ptomato commented Jul 10, 2024

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.

@anba
Copy link
Contributor Author

anba commented Jul 10, 2024

This is possibly caused by unicode-org/icu4x#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

@ptomato
Copy link
Contributor

ptomato commented Jul 10, 2024

Subscribed to that issue, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants