Download the PHP package muslims-community/prayer-times-calculation without Composer
On this page you can find all versions of the php package muslims-community/prayer-times-calculation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download muslims-community/prayer-times-calculation
More information about muslims-community/prayer-times-calculation
Files in muslims-community/prayer-times-calculation
Package prayer-times-calculation
Short Description Minimalist & offline Prayer Times calculation package for PHP
License MIT
Informations about the package prayer-times-calculation
Prayer Times Calculation Package for PHP
A minimalist and offline prayer times calculation package for PHP, supporting Laravel and other PHP frameworks. Calculate accurate Islamic prayer times using astronomical algorithms without requiring internet connectivity.
Features
- 🕌 Accurate prayer times calculation using astronomical algorithms
- 🌍 Support for multiple calculation methods (MWL, ISNA, Egypt, Makkah, Karachi, Custom)
- 📱 Offline calculation - no internet connection required
- ⚡ Fast and lightweight
- 🔧 Laravel integration with service provider and facade
- 🎯 Framework agnostic - works with any PHP framework
- ✅ Comprehensive test coverage
Installation
Via Composer
Laravel Auto-Discovery
The package supports Laravel's auto-discovery feature. The service provider and facade will be registered automatically.
Manual Laravel Registration
If auto-discovery is disabled, add the service provider to your config/app.php:
Publish Configuration (Laravel)
Usage
Basic Usage (Framework Agnostic)
Laravel Usage with Facade
Laravel Usage with Dependency Injection
Custom Calculation Method
Configuration (Laravel)
The configuration file config/prayer-times.php allows you to set default values:
Environment Variables
Add these to your .env file:
Calculation Methods
| Method | Fajr Angle | Isha Angle | Description |
|---|---|---|---|
| MWL | 18° | 17° | Muslim World League |
| ISNA | 15° | 15° | Islamic Society of North America |
| Egypt | 19.5° | 17.5° | Egyptian General Authority of Survey |
| Makkah | 18.5° | 18.5° | Umm Al-Qura University, Makkah |
| Karachi | 18° | 18° | University of Islamic Sciences, Karachi |
| Custom | Custom | Custom | User-defined angles |
Asr Jurisdictions
- Standard: Asr when shadow length equals object length plus shadow at noon
- Hanafi: Asr when shadow length equals twice the object length plus shadow at noon
Testing
Requirements
- PHP 8.0 or higher
- Laravel 9.0+ (for Laravel integration)
License
This package is open-sourced software licensed under the MIT license.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Credits
- Mahmoud Alsamman
- Based on the TypeScript version of the prayer times calculation library
Documentation
For comprehensive documentation, examples, and API reference, see:
- 📖 Full Documentation
- 🚀 Quick Start Guide
- 🔧 API Reference
Roadmap
- [ ] Add support for Qibla direction calculation
- [ ] Implement sunrise/sunset calculation for specific locations
- [ ] Add hijri date conversion utilities
- [ ] Create web-based prayer times widget
- [ ] Add more regional calculation methods
Community
Join our community and stay updated:
Support
For support, please:
- 📖 Check the documentation first
- 🔍 Search existing issues
- 🆕 Create a new issue if needed
- 📧 Contact: [email protected]