The Science of Islamic Prayer Times
PrayCalc is an open-source Islamic prayer time calculator built on rigorous astronomical science — NREL solar position algorithms, JPL ephemeris data, empirical twilight observations, and machine learning.
PrayCalc was built by Ali Camarata — an independent developer focused on Islamic technology. The underlying packages are open source and used to power praycalc.com and the Ummat super-app.
The Science
Solar Position & NREL SPA
How the NREL SPA algorithm computes Sun position with sub-arcsecond accuracy over a 2,000-year window.
Twilight Science
What happens optically as the Sun dips below the horizon and why depression angles define Islamic dawn and night.
Prayer Calculation Methods
The 14+ traditional fixed-angle methods — ISNA, MWL, Egypt, Umm al-Qura, Tehran, Karachi — and how they compare.
Dynamic vs. Fixed Angles
Physics-grounded adaptive twilight angles for any latitude and season, backed by 4,000+ empirical observations.
Packages
pray-calc
Islamic prayer times engine. All 14 standard methods, dynamic angle mode, TypeScript-first, ESM + CJS.
nrel-spa
TypeScript port of the NREL Solar Position Algorithm — ±0.0003° accuracy over a 2,000-year window.
moon-sighting
JPL DE442S-based lunar crescent visibility. Yallop and Odeh criteria. Drives Islamic month start calculations.
moon-cycle
NASA SVS moon phase imagery mapping. 8,760 hourly frames per year with jsDelivr CDN delivery.
hijri-core
Zero-dependency Hijri calendar engine. Umm al-Qura and FCNA/ISNA systems. Unlimited date range.
luxon-hijri
Hijri/Gregorian conversion with Luxon. Full format pattern support — iEEEE, iMMMM, iYYYY and more.