batoulapps / adhan-js

High precision Islamic prayer time library for JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

time difference for asr on Turkey

canbax opened this issue · comments

Firstly thanks a lot for this elaborate work.

Today I checked this library with below codes

import { Coordinates, CalculationMethod, PrayerTimes, Madhab } from "adhan";
const coordinates = new Coordinates(40.0082868, 32.8422953);
const params = CalculationMethod.Turkey();
params.madhab = Madhab.Hanafi;
const date = new Date(2022, 11, 20);
const prayerTimes = new PrayerTimes(coordinates, date, params);

console.log(prayerTimes);

It outputs

PrayerTimes {
coordinates: Coordinates { latitude: 40.0082868, longitude: 32.8422953 },
date: 2022-12-19T21:00:00.000Z,
calculationParameters: CalculationParameters {
madhab: 'hanafi',
highLatitudeRule: 'middleofthenight',
adjustments: { fajr: 0, sunrise: 0, dhuhr: 0, asr: 0, maghrib: 0, isha: 0 },
methodAdjustments: { fajr: 0, sunrise: -7, dhuhr: 5, asr: 4, maghrib: 7, isha: 0 },
polarCircleResolution: 'Unresolved',
rounding: 'nearest',
shafaq: 'general',
method: 'Turkey',
fajrAngle: 18,
ishaAngle: 17,
ishaInterval: 0,
maghribAngle: 0
},
fajr: 2022-12-20T03:29:00.000Z,
sunrise: 2022-12-20T04:59:00.000Z,
dhuhr: 2022-12-20T09:51:00.000Z,
asr: 2022-12-20T12:50:00.000Z,
sunset: 2022-12-20T14:26:00.000Z,
maghrib: 2022-12-20T14:33:00.000Z,
isha: 2022-12-20T15:58:00.000Z
}

There is a 27 minutes difference in Asr from https://namazvakitleri.diyanet.gov.tr Why is that? (I'm checking Ankara and GMT +3 timezone) The rest seems close to "Diyanet" times.

Ohh I just made params.madhab = Madhab.Shafi; and now it is very close. Thanks a lot!