-
Notifications
You must be signed in to change notification settings - Fork 244
Improve the docs of Hijri AstronomicalSimulation #7325
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
base: main
Are you sure you want to change the base?
Changes from all commits
9d662be
502afaa
fd32ecf
496e3ea
b008147
117b0ad
ce865e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,19 @@ mod ummalqura_data; | |
| /// | ||
| /// There are either 6 or 7 30-day months, so the length of the year is 354 or 355 days. | ||
| /// | ||
| /// # Crescent moon visibility | ||
| /// | ||
| /// According to Islam, months begin when an observer first sees the crescent moon. | ||
| /// | ||
| /// For centuries, astronomers have been developing criteria for predicting crescent moon | ||
| /// visibility. However, most regions that use the Hijri calendar rely on observations that | ||
| /// are impacted by atmospheric phenomena, meaning such predictions are only an approximation | ||
| /// of ground truth. | ||
| /// | ||
| /// The primary exception is Saudi Arabia, where the KACST uses sophisticated telescopes to | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what do sophisticated telescopes and observations have to do with UAQ? I also wouldn't necessarily call them "predictions", they are correct by definition
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They still claim to do observations. The calculations predict what their fancy infrared telescopes will see. I don't know what happens if they can't observe their prediction; I think they just claim that it won't ever happen, and they go to extreme measures to make sure that the crescent is visible when they claim it will be. This is a good article on the subject: https://www.middleeasteye.net/news/eid-2025-does-saudi-arabia-report-impossible-moonsightings Here's an example image of a crescent sighting done with this method:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That article literally says that their observation claim is BS because they've claimed impossible sightings.
It also clearly states that UAQ is a calculated calendar.
I don't think we should echo SA's scientifically dubious claims and just state UAQ as what it is.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, fair point. I changed it to: "The primary exception is Saudi Arabia, where the KACST publishes official predictions of crescent timings for multiple centuries." Moved to #7330 |
||
| /// make the observations more reliable. They publish predictions covering multiple centuries; | ||
| /// see [`UmmAlQura`]. | ||
| /// | ||
| /// # Calendar drift | ||
| /// | ||
| /// As a lunar calendar, this calendar does not intend to follow the solar year, and drifts more | ||
|
|
@@ -129,19 +142,27 @@ pub trait Rules: Clone + Debug + crate::cal::scaffold::UnstableSealed { | |
|
|
||
| /// [`Hijri`] [`Rules`] based on an astronomical simulation for a particular location. | ||
| /// | ||
| /// These simulations are unofficial and are known to not necessarily match sightings | ||
| /// on the ground. Unless you know otherwise for sure, instead of this variant, use | ||
| /// [`UmmAlQura`], which uses the results of KACST's Mecca-based calculations. | ||
| /// If your goal is to match ground truth in Saudi Arabia, use [`UmmAlQura`] instead. | ||
| /// | ||
| /// As floating point arithmetic degenerates for far-away dates, this falls back to | ||
| /// the tabular calendar at some point. | ||
| /// These rules are based on calculations of the Earth, moon, and sun along with the | ||
| /// Shaukat criterion to determine crescent moon visibility.[^1] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change removes the remark "These simulations are unofficial and are known to not necessarily match sightings on the ground." and instead name drops "Shaukat criterion". To a reader unfamiliar with the topic who is delegating to ICU4X for i18n expertise, this gives appearance of more gravitas (than before this PR) to this variant, which isn't the direction that we should be going in as long as we don't have evidence that this unofficial simulation serves user needs better than sticking to KACST's calculation that has official status. |
||
| /// | ||
| /// These rules can form the basis of a custom [`Rules`] implementation that includes | ||
| /// crescent sighting adjustments. As discussed in the [`Hijri`] documentation, using these | ||
| /// rules without allowing such adjustments will produce dates that are only approximations | ||
| /// of the ground truth. | ||
| /// | ||
| /// The simulations are pre-computed for Gregorian years 1900 to 2140, falling back to | ||
| /// a tabular approximation outside that range. | ||
| /// | ||
| /// The precise behavior of this calendar may change in the future if: | ||
| /// - We decide to tweak the precise astronomical simulation used | ||
| /// - We decide to expand or reduce the range where we are using the astronomical simulation. | ||
| /// | ||
| /// This corresponds to the `"islamic-rgsa"` [CLDR calendar](https://unicode.org/reports/tr35/#UnicodeCalendarIdentifier) | ||
| /// if constructed with [`Hijri::new_simulated_mecca()`]. | ||
| /// | ||
| /// [^1]: See [calendrical_calculations::islamic::observational_islamic_from_fixed] | ||
| #[derive(Copy, Clone, Debug, PartialEq, Eq)] | ||
| pub struct AstronomicalSimulation { | ||
| pub(crate) location: SimulatedLocation, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we shouldn't land this change. This change pushes the docs even further to the direction of suggesting that modeling religious Hijri calendar use by approximation is something that internationalized software should do and that ICU4X is suited for doing. I think we don't have evidence that this is what we should be suggesting to app developers who delegate i18n expertise to ICU4X.
I think we should have the discussions we are having in parallel to this pull request about scope. I think we shouldn't be leaning into ways to rationalize keeping shipping
SimulatedHijri, when it continues to look to me that we have it because it's sunk-cost code that's appealing to programmers even though we haven't seen a presentation of strong evidence of any particular instantiation ofSimulatedHijriaddressing substantial user needs. The Cairo parameter came about because it was an example parameter. As for the Mecca parameter, I think we continue to lack a strong case for providing an unofficial Mecca-reference simulation when we provide an official Mecca-reference simulation.My preference would be to steer the docs in the direction of the following:
islamic-civilis in CLDR, because IBM picked it for reasons that we don't have visibility into, and now it also serves as ICU4C-compatible out-of-KACST-range fallback for Umm al-Qura, andislamic-tblais CLDR because Microsoft picked it for reasons we don't have visibility into (I think we shouldn't retell the stated story without commentary, and commentary doesn't belong in our docs, so I think we shouldn't be telling the stated story).islamic-tblaandislamic-civiluse is the most common one. It's unclear to me to what extent these sources are repeating each other, but it's likely OK for us to repeat the claim. It's easy to believe that this is why both IBM and Microsoft picked this leap year cycle, but that's a guess.