Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: round the prayer times to the nearest minute #9

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

Brikaa
Copy link
Contributor

@Brikaa Brikaa commented Dec 13, 2024

No description provided.

@azzamsa
Copy link
Owner

azzamsa commented Dec 13, 2024

Hi, thanks for the PR.

Would you like to give the context?

@Brikaa
Copy link
Contributor Author

Brikaa commented Dec 13, 2024

@azzamsa I noticed the tool would sometimes report prayers that are one minute earlier than other tools. If we have a prayer at 11:47:45, bilal would report it as 11:47. After this PR, bilal would report it as 11:48.

@azzamsa
Copy link
Owner

azzamsa commented Dec 13, 2024

I use this site as a reference https://www.jadwalsholat.org/, this site add more 2 minutes for Ihtiyati (precautionary). So you have to subtract the time in the web with -2.

image

bilal on  master [!] is 📦 v1.9.1 via 🦀 v1.81.0
🦄 cargo run -- all
+Fajr: 03:38 AM
Sherook: 05:04 AM
Dohr: 11:20 AM
Asr: 02:47 PM
Mghreb: 05:36 PM
+Ishaa: 06:52 PM
Fist third of night: 08:57 PM
+Midnight: 10:37 PM
+Last third of night: 12:17 AM
bilal on  brikaa [!] is 📦 v1.9.1 via 🦀 v1.81.0 took 3s
🦄 cargo run -- all
+Fajr: 03:39 AM
Sherook: 05:04 AM
Dohr: 11:20 AM
Asr: 02:47 PM
Mghreb: 05:36 PM
+Ishaa: 06:53 PM
Fist third of night: 08:57 PM
+Midnight: 10:38 PM
+Last third of night: 12:18 AM

If I compare the result to the web:

Prayer Web mine yours
Fajr 03:39 03:38 03:39
Ishaa 18:53 18:52 18:53

Your branch had the exact value with the Web.
I always thought about the solution for a long time, but I never had a clue that it was about rounding the minutes.
Thanks a lot habiby, hope it becomes amal jariyah for you. 🙏🏽

@azzamsa azzamsa merged commit 024d628 into azzamsa:master Dec 13, 2024
7 of 8 checks passed
@azzamsa azzamsa changed the title Round the prayer times to the nearest minute fix: round the prayer times to the nearest minute Dec 13, 2024
@Brikaa Brikaa deleted the round-time branch December 13, 2024 21:03
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.

2 participants