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

If Isha is after 00:00 the time remaining for the next prayer will incorrectly display the time until Fajir #3

Open
faissaloo opened this issue May 24, 2019 · 10 comments

Comments

@faissaloo
Copy link
Owner

image

@faissaloo
Copy link
Owner Author

This issue is worsened by the fact that once the time hits 00:00 the time for Isha will also change.

@faissaloo
Copy link
Owner Author

Just some other notes for anyone who decides to take a look at this, but Isha being later than 00:00 isn't really a thing, this happens at the far end of the northern hemisphere because there are times when twilight basically doesn't happen but the algorithm tries to calculate it anyway. A solution might be to define a configurable cap on how late Isha can be at most according to the rulings of whichever faqih's opinion you follow.

@Skaldebane
Copy link

May Allah bless you bro. Does your version of the extension fix this behavior?
By the way, the original repo seems to be completely abandoned.

@faissaloo
Copy link
Owner Author

faissaloo commented Sep 27, 2020

@Skaldebane No unfortunately, this specific behaviour is one that I do not have a solution for since part of the problem is that it involves some unclear matters mixed with issues with the existing codebase. I decided to document it in case someone else has an idea for a solution.
All that said, this shouldn't be an issue if you don't live near either pole since you experience a normal twilight. I live in the UK so there are times during the year when the sun does not completely set and I believe that is what causes this issue.

@Skaldebane
Copy link

Skaldebane commented Sep 27, 2020

Oh yeah I get the point. I live in Morocco which is almost exactly at the equator line so I don't notice such problems (usually Isha never goes past 11PM, so I don't think this applies to me), though it's a very interesting bug to see here, and I wonder if there's any way to get around it...

This plugin apparently uses PrayTimes.js library, and there's a high chance that the problem lies in there actually.

@faissaloo
Copy link
Owner Author

I don't believe this is a problem with PrayTimes.js as the code that handles the countdown is quite separate from it. It's simply that dealing with this edge case is a fiqhi matter that's a bit out of its scope. The problem on our end is that the code assumes this can't happen and so when we're in the next day it assumes that the next prayer must be fajir.

But just for context if we were to discover PrayTimes.js was broken that's something we'd need to take up with http://praytimes.org/ and/or we need to switch to something that's well tested and still maintained like https://github.com/batoulapps/adhan-js

@Skaldebane
Copy link

Skaldebane commented Oct 1, 2020

Yeah exactly! I've initially responded to you with

"the dev might've assumed that Isha never goes beyond 12 am which misled him into leaving this bug"

then I edited it after I saw that the PrayTimes library wasn't updated since 2011 😅.

But as you know, editing someone else's code (fixing the behavior or replacing the library) is like hell, so I think it might be appropriate to just start a new project from scratch, and then keeping it maintained and fixing bugs that the users might encounter later.

@faissaloo
Copy link
Owner Author

faissaloo commented Oct 1, 2020

I mean, if you want to do a complete rewrite I'm not gonna stop you lol, more power to you (although you should make it clear that it's a WIP until you've tested its accuracy). You should note that if you do end up rewriting it you'll have to do it in Javascript because the GNOME plugin system doesn't support anything else.

I'm just gonna stick with the existing codebase, my intention with this fork was mostly to deal with alot of the outstanding suggestions, unify some of the existing forks, keep it working and clean up some of the code. I use KDE now so I won't be giving it as much attention I was previously.

@Skaldebane
Copy link

Oh yeah 👍
I already had plans for making something like this for Android, so I thought it might be a good idea to give the extension a try, as it might be a good opportunity for me to learn and practice JavaScript for the first time :D

And thanks a lot for responding!

@faissaloo
Copy link
Owner Author

faissaloo commented Oct 2, 2020

No worries, allahumabarik akhi

faissaloo pushed a commit that referenced this issue Oct 10, 2022
Remove "Imsak" as it has no islamic basis
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

No branches or pull requests

2 participants