astral icon indicating copy to clipboard operation
astral copied to clipboard

Python calculations for the position of the sun and moon.

Results 57 astral issues
Sort by recently updated
recently updated
newest added

It would be helpful if Astral could be used to calculate moon rise and set times in addition to phase of the moon. I'm hoping this would be somewhat in...

poetry build command fails because there isn't `doc` directory. This PR fixes this problem.

``` import pytz import datetime import astral import astral.location tz='UTC' utc_now = datetime.datetime(2010, 1, 1, tzinfo=pytz.timezone(tz)) obs = astral.Observer(latitude=66.5, longitude=162.4, elevation=0.0) print(utc_now) # datetime.datetime(2010, 1, 1) sunrise = astral.sun.sunrise(obs,utc_now) sunset...

city = LocationInfo("Tromsø", "Norway", "Europe/Tromsø", 69.65, 18.78) produces: dawn: 2021-08-29 01:31:26.185793 dusk: 2021-08-29 19:55:29.714044 Real data: https://www.timeanddate.no/astronomi/sol/norge/tromso

I'm not sure what your policy is regarding adding new locations, so feel free to decline this if it doesn't fit your vision, but I suggest to add **Zurich, Switzerland**....

``` >>> city = LocationInfo("Tromsø", "Norway", "Europe/Tromsø", 69.66, 18.82) >>> s = sun(city.observer, date=datetime.date(2021, 7, 16)) Traceback (most recent call last): File "/home/andre/.local/lib/python3.8/site-packages/astral/sun.py", line 734, in dawn return time_of_transit( File...

On the current master (96496f0), during a polar (24-hour) night, calling `sunrise()`/`sunset()` will occasionally throw the exact opposite error: > ValueError: Sun is always above the horizon on this day,...

http://www.skyandtelescope.com/wp-content/observing-tools/moonphase/moon.html and http://sphinx.pocoo.org/ are dead links.

Migrating from Astral v1 to v2 we had an unexpected "bug" which was related on how we were formerly dealing with dates. V2 outputs also microseconds and therefore downstream code...