In the polar regions, the sun may stay up the whole day (midnight sun) or may stay down the whole day (polar night). In both cases, we raise the same exception:
|
raise SunTimeException('The sun never rises on this location (on the specified date)') |
It would be useful to know whether we have sunlight the whole day or night the whole day.
Looking at
|
if cosH > 1: |
|
return None # The sun never rises on this location (on the specified date) |
|
if cosH < -1: |
|
return None # The sun never sets on this location (on the specified date) |
it seems that the algorithm knows whether we have midnight sun or polar night.
Could you raise a different exception depending on whether we have midnight sun or polar night?
If you agree that this is a useful feature I can try to make a PR.
In the polar regions, the sun may stay up the whole day (midnight sun) or may stay down the whole day (polar night). In both cases, we raise the same exception:
suntime/suntime/suntime.py
Line 36 in 8053379
It would be useful to know whether we have sunlight the whole day or night the whole day.
Looking at
suntime/suntime/suntime.py
Lines 104 to 107 in 8053379
it seems that the algorithm knows whether we have midnight sun or polar night.
Could you raise a different exception depending on whether we have midnight sun or polar night?
If you agree that this is a useful feature I can try to make a PR.