batoulapps / adhan-swift

High precision Islamic prayer time library for Swift
MIT License
182 stars 42 forks source link

Embed recommended high altitude rule into prayer calculations #61

Closed basememara closed 3 years ago

basememara commented 3 years ago

Wondering what your thoughts are on baking in the high altitude recommendation into the prayer calculations. I tried to do this in a backwards compatible way so the multiple nil-coalescing is a little funky.

You can see I had to fix a unit test that was failing because of this change, but it's a good failing because this change caught a non-sense prayer times table for the UK.

This PR is in draft mode until discussed and repointed to develop branch after it gets updated.

z3bi commented 3 years ago

thankfully nightPortions is not a public method so we don't really need to maintain backwards compatibility and we can make the coordinates required. That should simplify some of the unwrapping logic.

In general I think this is a good improvement 👍

basememara commented 3 years ago

Sweet, ok I made the update and changed to review.