-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Different times yield different zmanim.
MWE:
import datetime as dt
from zmanim.util.geo_location import GeoLocation
from zmanim.zmanim_calendar import ZmanimCalendar
location = GeoLocation('Lakewood, NJ', 40.0721087, -74.2400243, 'America/New_York', elevation=15)
print(ZmanimCalendar(geo_location=location, date=dt.datetime(2023,8,7)).shkia())
print(ZmanimCalendar(geo_location=location, date=dt.datetime(2023,8,7,1)).shkia())Even worse, when no date is passed, the default is a datetime object with the current time, so
print(ZmanimCalendar(geo_location=location).shkia())will yield different, incorrect times throughout the day.
As per @pinnymz, ZmanimCalendar should require a date object.
While a datetime object can be coerced to a date, since the caller may possibly want the next day's zmanim (e.g., if it's after nightfall), we agreed that the input should be restricted to date object, placing the onus on the caller to decide which date.
PR to follow.
Metadata
Metadata
Assignees
Labels
No labels