astral icon indicating copy to clipboard operation
astral copied to clipboard

Fix documentation of the night and twilight functions

Open Triple-S opened this issue 2 years ago • 0 comments

Hello,

when using the astral package I realized there is an error in the documentation of the night function: The documentation was stating the night function to calculate the time between astronomical dusk and dawn, which would be when the sun is at -18°, but in the code the civil dusk and dawn, when the sun is at -6°, was used. Furthermore, in the documentation of the twilight function the civil dawn/dusk was described by "when the sun is at -6 degrees" which is the same but overcomplicated. Finally, the code was using hard-coded degree values instead of the values from the Depression enumeration which makes it easier understandable.

All tests are passing.

Best regards, Triple-S

Triple-S avatar Jan 04 '24 09:01 Triple-S