515
Comment:
|
702
|
Deletions are marked like this. | Additions are marked like this. |
Line 13: | Line 13: |
The {{{getSunRiseSet()}}} method returns a tuple of datetime objects with timezome info. |
|
Line 17: | Line 19: |
and | The {{{isNight()}}} method returns {{{True}}} if it is nighttime and {{{False}}} if it is daytime. |
Sunrise Sunset
This class will determine the sunrise and sunset. It can use either official, civil, nautical, amateur, or astronomical zenith.
The constructor takes three positional arguments and one keyword argument.
ss = SunriseSunset(date, lat, lon, zenith='official')
There are two callable methods after the class is instantiated.
The getSunRiseSet() method returns a tuple of datetime objects with timezome info.
rise, set = ss.getSunRiseSet()
The isNight() method returns True if it is nighttime and False if it is daytime.
isNight = ss.isNight()