islamic-network/prayer-times-moonsighting 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

islamic-network/prayer-times-moonsighting

最新稳定版本:1.1

Composer 安装命令:

composer require islamic-network/prayer-times-moonsighting

包简介

PHP Prayer Times Library to Calculate Fajr and Isha times per moonsighting.com

README 文档

README

Releases CI

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

This library has been written for the AlAdhan.com API @ https://aladhan.com/prayer-times-api and is included in the main prayer times library @ https://github.com/islamic-network/prayer-times.

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, 'general'); // The third parameter is shafaq, acceptable values for which are 'general', 'ahmer', 'abyad'.
$pt->getMinutesAfterSunset(); // 86 minutes

Tests

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

vendor/bin/phpunit tests/Unit/

Credits

Syed Khalid Shaukat, who has done the research for this method of computing timings for higher latitude areas. For more information about the calculation, please see the Fajr and Isha booklet @ https://github.com/islamic-network/prayer-times-moonsighting/blob/master/booklet-fajr-isha.pdf and visit https://www.moonsighting.com/.

统计信息

  • 总下载量: 16.11k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2020-07-22