Skip to content

mawaqit/prayer-times-moonsighting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Library to Calculate Fajr and Isha Timings per MoonSighting.com

Requirements

  • PHP 7.3+

Install

composer install islamic-network/prayer-times-moonsighting

Usage

To calculate Fajr minutes before sunrise:

use IslamicNetwork\MoonSighting\Fajr;
use DateTime;

$date = new DateTime('24-12-2020');
$pt = new Fajr($date, 25.2119894);
$pt->getMinutesBeforeSunrise(); // 88 minutes

To calculate Isha minutes after sunset:

use IslamicNetwork\MoonSighting\Fajr;
use DateTime;

$date = new DateTime('24-12-2020');
$pt = new Isha($date, 25.2119894);
$pt->getMinutesAfterSunset(); // 86 minutes

Tests

To run unit tests, from the root of this repository execute:

vendor/bin/phpunit tests/Unit/

About

A fork of islamic-network/prayer-times-moonsighting which has been deleted from gihub

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages