Skip to content

fix: add Kosovo country support and correct Pristina iftar time#33

Open
Muhammad-Zohaib007 wants to merge 1 commit intoahmadawais:mainfrom
Muhammad-Zohaib007:fix/kosovo-country-support
Open

fix: add Kosovo country support and correct Pristina iftar time#33
Muhammad-Zohaib007 wants to merge 1 commit intoahmadawais:mainfrom
Muhammad-Zohaib007:fix/kosovo-country-support

Conversation

@Muhammad-Zohaib007
Copy link

@Muhammad-Zohaib007 Muhammad-Zohaib007 commented Feb 27, 2026

Fix #29
Kosovo was missing from the country recommendation maps in src/recommendations.ts, causing two bugs:

Kosovo not recognized — getRecommendedMethod('Kosovo') returned null, so no method was auto-recommended during setup Iftar ~2 minutes early in Pristina — without a recognized country, the Aladhan API was called without the correct calculation method, producing inaccurate Maghrib times

Fixed:
The Islamic Community of Kosovo (BIK — Bashkësia Islame e Kosovës) officially uses the Turkey Diyanet method (method 13) for prayer time calculations, consistent with the broader Balkan region. Kosovo's ~95% Muslim population follows the Hanafi school.

Added Kosovo, Kosova (Albanian name), and Republic of Kosovo to:

countryMethodMap → method 13 hanafiCountries → school 1 (Hanafi)

Tests:
Added 2 new test cases covering method and school recommendation for all three Kosovo name variants. All 40 tests pass.

Kosovo was missing from countryMethodMap and hanafiCountries, causing
two issues:
1. The country was not recognized during setup (no auto-recommendation)
2. Iftar time in Pristina showed ~2 minutes early due to wrong default
   calculation method being used by the Aladhan API

The Islamic Community of Kosovo (BIK) officially uses the Turkey
Diyanet method (method 13) for prayer time calculations, consistent
with the broader Balkan region. Kosovo's ~95% Muslim population
follows the Hanafi school of jurisprudence.

Adds 'Kosovo', 'Kosova' (Albanian name), and 'Republic of Kosovo'
to both maps. Includes tests for method and school recommendation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: It does not recognize Kosovo as a country and it shows 2 minutes early for iftar time at Pristina, Kosovo

1 participant