-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
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:
Line 36 in 8053379
| 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
Lines 104 to 107 in 8053379
| 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.
bendeaton and mexon
Metadata
Metadata
Assignees
Labels
No labels