Module zmanim_calculator

Module zmanim_calculator 

Source
Expand description

An API that can calculate sunrise, sunset and Jewish zmanim (religious times) for prayers and other Jewish religious duties.

This module contains the main functionality of the rust-zmanim library. Elevation based zmanim (even sunrise and sunset) should not be used lekula without the guidance of a posek. According to Rabbi Dovid Yehudah Bursztyn in his Zmanim Kehilchasam, 7th edition chapter 2, section 7 (pages 181-182) and section 9 (pages 186-187), no zmanim besides sunrise and sunset should use elevation. However, Rabbi Yechiel Avrahom Zilber in the Birur Halacha Vol. 6 Ch. 58 Pages 34 and 42 is of the opinion that elevation should be accounted for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should be factored into zmanim calculations.

When a zman will not occur these functions return None. See note in astronomical_calculator

Enums§

ZmanOffset
Offset used for alos or tzais

Functions§

alos
Returns alos hashachar (dawn) based on either declination of the sun below the horizon, a fixed time offset, or a minutes zmaniyos (temporal minutes) offset before sunrise
chatzos
Returns Astronomical noon.
fixed_local_chatzos
Returns the local time for fixed chatzos. This time is noon and midnight adjusted from standard time to account for the local latitude. The 360° of the globe divided by 24 calculates to 15° per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc… Chatzos is at exactly 12:00 noon. This is the time of chatzos according to the Aruch Hashulchan in Orach Chaim 233:14 and Rabbi Moshe Feinstein in Igros Moshe Orach Chaim 1:24 and 2:20. Lakewood, N.J., with a longitude of -74.222, is 0.778 away from the closest multiple of 15 at -75°. This is multiplied by 4 to yield 3 minutes and 7 seconds for a chatzos of 11:56:53. This method is not tied to the theoretical 15° time zones, but will adjust to the actual time zone and Daylight saving time.
hanetz
Returns sea level sunrise if use_elevation is false, or sunrise if it is true. This allows relevant zmanim to automatically adjust to the elevation setting
mincha_gedola
A generic function for calculating mincha gedola that is 6.5 shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this function. Mincha gedola is the earliest time one can pray mincha. The Rambam is of the opinion that it is better to delay mincha until mincha ketana while the Rash, Tur, GRA and others are of the opinion that mincha can be prayed lechatchila starting at mincha gedola.
mincha_gedola_30_minutes
Returns mincha gedola calculated as 30 minutes after chatzos and not 1/2 of a shaah zmanis after chatzos as calculated by mincha_gedola. Some use this time to delay the start of mincha in the winter when 1/2 of a shaah zmanis is less than 30 minutes. See One should not use this time to start mincha before the standard mincha gedola. See Shulchan Aruch Orach Chayim 234:1 and the Shaar Hatziyon seif katan ches.
mincha_ketana
A generic function for calculating mincha ketana (preferred earliest time to recite mincha in the afternoon) that is 9.5 shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this function.
plag_hamincha
A generic function for calculating plag hamincha (the earliest time that Shabbos can be started) that is halfway between mincha gedola and mincha ketana, or 10.75 shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this function.
shaah_zmanis
Gives the length of a shaah zmanis (temporal hour), given the start (usually hanetz or alos) and end (shkia or tzais) of the day
shkia
Returns sea level sunset if use_elevation is false, or sunset if it is true. This allows relevant zmanim to automatically adjust to the elevation setting
sof_zman_shema
A generic function for calculating the latest zman krias shema (time to recite shema in the morning) that is 3 shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this function.
sof_zman_tefila
A generic function for calculating the latest zman tefila (time to recite shacharis in the morning) that is 4 shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this function.
tzais
Returns tzais (nightfall) based on either declination of the sun below the horizon, a fixed time offset, or a minutes zmaniyos (temporal minutes) offset after sunset