batoulapps / adhan-kotlin

High precision Islamic prayer time library for Java
MIT License
157 stars 47 forks source link

Support Maghrib angle offset #60

Closed vadiole closed 10 months ago

vadiole commented 10 months ago

Hello!

For some calculation methods (Jafari, Tahran) Maghrib time is calculated later than sunset.

Please add an option to specify offset angle for Maghrib

image

Source

ahmedre commented 10 months ago

I believe today, this isn't supported even in adhan-swift, @z3bi can confirm though.

vadiole commented 10 months ago

This looks like a commit in which this parameter was added to swift version, @ahmedre please take a look: https://github.com/batoulapps/adhan-swift/commit/205af609ee5d3bc82bb432933866a04356f38907

vadiole commented 10 months ago

I could make a pull request with the necessary changes. Can you confirm that you will be able to merge it and release a new version?

ahmedre commented 10 months ago

please hold off - my intention is to go through the Swift code again and "catch up" the missing features since that's not the only thing missing at the moment.

vadiole commented 10 months ago

Yes, indeed. I offer my help in adding this setting because I use this wonderful library and due to the lack of this setting some of my users are getting the wrong time for Maghrib.

I could port the logic that is already in swift for java if you would be willing to accept my PR. If you implement it on your own in the near future, I can wait a bit. My main intention is that I would like to provide my users with the correct Maghrib time as soon as possible, and I don't mind contributing to this library.

ahmedre commented 10 months ago

thank you - will prioritize this in sha' Allah.

vadiole commented 10 months ago

Hello, any updates on this issue?

ahmedre commented 10 months ago

PR #63 brings Adhan Kotlin up to date with Adhan Swift, with the exception of the Maghrib angle offset feature. After consideration, we unfortunately will not be adding this feature to the Kotlin / Java libraries, because it is against the consensus of the scholars on the definition of when Maghrib is.

vadiole commented 10 months ago

I respect your decision, however some locations use this kind of offset to calculate Madhrib. I still can use some other solution, if you are not willing to add this option.

At least you might want to close this as "won't do", as the feature is still missing.

Btw, are there plans to remove this feature for swift version?

ahmedre commented 10 months ago

I spoke with @z3bi (author / maintainer of the Swift version), and he has no plans to remove it from the Swift version