parshios module
The parshios module has functions to find the weekly parasha.
Examples
>>> from pyluach import dates, parshios
>>> date = dates.HebrewDate(5781, 10, 5)
>>> parshios.getparsha(date)
'Vayigash'
>>> parshios.getparsha_string(date, hebrew=True)
'ויגש'
>>> parshios.getparsha_string(dates.GregorianDate(2021, 3, 7), hebrew=True)
'ויקהל, פקודי'
Note
The algorithm is based on Dr. Irv Bromberg’s, University of Toronto at http://individual.utoronto.ca/kalendis/hebrew/parshah.htm
All English parsha names are transliterated into the American Ashkenazik pronunciation.
- pyluach.parshios.getparsha(date, israel=False)[source]
Return the parsha for a given date.
Returns the parsha for the Shabbos on or following the given date.
- Parameters:
- Returns:
A list of the numbers of the parshios for the Shabbos of the given date, beginning with 0 for Beraishis, or
None
if the Shabbos doesn’t have a parsha (i.e. it’s on Yom Tov).- Return type:
- pyluach.parshios.getparsha_string(date, israel=False, hebrew=False)[source]
Return the parsha as a string for the given date.
This function wraps
getparsha
returning the parsha name.- Parameters:
date (BaseDate) – Any subclass of
BaseDate
. The date does not have to be a Shabbos.israel (bool, optional) –
True
if you want the parsha according to the Israel schedule (with only one day of Yom Tov). Default isFalse
.hebrew (bool, optional) –
True
if you want the name of the parsha in Hebrew. Default isFalse
.
- Returns:
The name of the parsha separated by a comma and space if it is a double parsha or
None
if there is no parsha that Shabbos (ie. it’s yom tov).- Return type:
str or None
- pyluach.parshios.iterparshios(year, israel=False)[source]
Generate all the parshios in the year.