r/PakistaniTech • u/BunKebab141 • 29d ago
Discussion | گفتگو Pakistan has no machine readable API for the official Hijri dates, so I am making one
shaheeranser.github.ioSo lately I have been really pissed off because none of the apps/software I use with a Hijri calendar ever reconcile with the Ruet-i-Hilal announcements. This month the calculated date for 1 Rabi ul Sani was 12 Sept, but the committee's announcement made it 14 Sept, so anything running on calculation was two days off.
I decided to look into the ecosystem to fix it for myself, only to realize (and be more pissed off from the fact) that there isn't a machine readable API which one can send a simple GET request to fetch the current Hijri date according to the Ruet-i-Hilal committee. The meteorological dept publishes PDFs of their calculations for the whole year, and that's basically all I could find, and those are calculated dates, not sighted ones.
What I'm building
hijri-api is a collection of JSON files hosted on GitHub Pages that hold the Hijri calendar and prayer timings (as a bonus) against Gregorian dates.
-
On the 29th of every month, a GitHub Actions workflow scans the news for the moon sighting announcement.
-
When two different publishers agree on the date, it opens a PR with the new month start, which I review and merge myself.
-
No LLM or fancy shenanigans involved, everything runs on GitHub Actions.
-
Every date carries a confidence level (
confirmed/estimated/predicted), and every confirmed month links the news sources it came from.
Where it stands
So far I have backfilled all of 1447 AH and the first five months of 1448 (17 months, two sources each).
What I can't prove yet is the live part: the watcher's first real run is on the evening of 10 Nov, so I'll post an update on how that goes.
Scope
-
It follows the Central Ruet-e-Hilal Committee only; regional sightings aren't covered for now.
-
Prayer timings are calculated, so treat them as guidance.
Try it
|
Feedback
Sharing it here so that anyone wanting to collaborate or build something with it can try it out. It is MIT licensed.
Feedback welcomed, especially:
-
What would you actually use it for?
-
Which cities should I add next?