docs: add the libmuslim Hijri calendar API section - #29
Merged
Conversation
hijri.h had no documentation on the site at all, despite being the larger of the two headers and the one whose API is hardest to use correctly without guidance. Three pages under the C section, matching the shape the prayer times section already uses. hijri.h is C only, since neither the Rust nor the Dart binding vendors it. The overview frames the header as three layers, tabular arithmetic, named local predicates, and raw evening parameters, and tells the reader to pick the lowest one that answers their question. It states plainly that a local predicate is not a national calendar, since that is the mistake this API most invites. The quick start runs all three layers on the same Gregorian date and gets three different Hijri dates, 11, 12 and 13 of the month. That is the clearest way to show there is no single answer and no function that returns one. It then shows the evening parameters and the per-term margins behind a failing decision. Every code sample was compiled with -Wall -Wextra -Wpedantic and run. The output blocks are its real output, not transcribed. The reference covers every public type and function, and records what the header will not do, including that there is no sunrise finder, that the Sun and Moon are deliberately in different reference frames, that Umm al-Qura ships the published table rather than recomputing it, and that Yallop is validated against 271 observations while Odeh is not.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hijri.hhad no documentation on the site at all, despite being the larger of the two headers and the one whose API is hardest to use correctly without guidance.Three pages under the C section, matching the shape the prayer times section already uses. It sits at position 2, after Prayer times API.
hijri.his C only, since neither the Rust nor the Dart binding vendors it.Overview
Frames the header as three layers and tells the reader to pick the lowest one that answers their question:
It states plainly that a local predicate is not a national calendar, with the Kemenag 33-of-37 figure as evidence, because that is the mistake this API most invites.
Quick start
Runs all three layers on the same Gregorian date and gets three different answers:
That is the clearest way to show there is no single Hijri date and no function that returns one. The page then shows the evening parameters, and the per-term margins behind a failing MABIMS 2021 decision, so a reader can see the difference between missing by 1.38 deg and missing by 0.01 deg.
Every code sample was compiled with
-Wall -Wextra -Wpedanticand run. The output blocks are its real output, not transcribed.API reference
Every public type and function. It also records what the header will not do:
strictis per term, which is how you implement the MUISexceedwordingThree things I got wrong and fixed before pushing
Recording these because they were caught by checking against the header rather than by review:
hijri_moon_topocentric()takes latitude, longitude and elevation as separate doubles with two out-parameters, not aHijriLocation *Verification
npm run buildsucceeds withonBrokenLinks: 'throw'.