shaheeranser
All projects

hijri-api

Verified, auditable Hijri dates as static JSON.

Open Hijri calendar and prayer time data for Pakistan: a verified, auditable archive of sighted month starts with confidence levels, served as static JSON.

MIT · static JSON API
  • TypeScript
  • JSON
  • GitHub Actions

Pakistan has no machine-readable source for sighted Hijri month starts. Most calendars return a computed table with no provenance, so you cannot tell why a date differs from the announcement or how much to trust it.

hijri-api keeps a verified, auditable archive of the sighted starts with a calculated fallback, computes prayer times locally, and watches the news for each announcement so a human approves the update through a pull request. The repository is the data store, the build system and the API.

API
# Base URL: https://shaheeranser.github.io/hijri-api
GET /hijri/index.json                    # coverage, generation time, available years
GET /hijri/overrides.json                # the confirmed month-start record, with sources
GET /hijri/calendar/<hijriYear>.json     # Gregorian date → Hijri date + confidence
GET /prayer/<city>/<profile>/<year>.json # daily prayer times

Every date carries its confidence

Every published Hijri date carries a confidence level; prayer times are calculated, not observed.

  • confirmed — a verified start date exists in overrides.json.
  • estimated — a past month with no verified entry, from the baseline.
  • predicted — a future month, from the baseline.
  • unconfirmed — the last day of a month, where the sighting decides whether a 30th day exists.

Where it runs

The JSON is the contract: dates are precomputed, so no astronomy library is needed at runtime and other languages can read the files directly. The site is published as static files on GitHub Pages, so the full history is diffable in git.

Cities: karachi, lahore, peshawar. Profiles: sunni_hanafi, sunni_asr1 (earlier Asr), shia_jafari.

Read the data

The live API stays at shaheeranser.github.io/hijri-api; this page only links to it.