hebrewcal module¶
-
class
pyluach.hebrewcal.
Month
(year, month)[source]¶ Bases:
object
A Month object represents a month of the Hebrew calendar.
It provides the same operators as a Year object.
- Parameters
year (int) –
month (int) – The month as an integer starting with 7 for Tishrei through 13 if necessary for Adar Sheni and then 1-6 for Nissan - Elul.
-
year
¶ The Hebrew year.
- Type
int
-
month
¶ The month as an integer starting with 7 for Tishrei through 13 if necessary for Adar Sheni and then 1-6 for Nissan - Elul.
- Type
int
-
name
¶ The name of the month.
- Type
str
-
iterdates
()[source]¶ Return iterator that yields an instance of HebrewDate.
- Yields
HebrewDate
– The next Hebrew Date of the year starting the first day of Tishrei through the last day of Ellul.
-
molad
()[source]¶ Return the month’s molad.
- Returns
A dictionary in the form {weekday: int, hours: int, parts: int}
- Return type
dict
Notes
This method does not return the molad in the form that is traditionally announced in the shul. This is the molad in the form used to calculate the length of the year.
See also
molad_announcement()
The molad as it is traditionally announced.
-
molad_announcement
()[source]¶ Return the months molad in the announcement form.
Returns a dictionary in the form that the molad is traditionally announced. The weekday is adjusted to change at midnight and the hour of the day and minutes are given as traditionally announced. Note that the hour is given as in a twenty four hour clock ie. 0 for 12:00 AM through 23 for 11:00 PM.
- Returns
A dictionary in the form
{ weekday: int, hour: int, minutes: int, parts: int }
- Return type
dict
-
class
pyluach.hebrewcal.
Year
(year)[source]¶ Bases:
object
A Year object represents a Hebrew calendar year.
It provided the following operators:
Operation
Result
year2 = year1 + int
New
Year
int
days after year1.year2 = year1 - int
New
Year
int
days before year1.int = year1 - year2
int
equal to the absolute value of the difference between year2 and year1.bool = year1 == year2
True if year1 represents the same year as year2.
bool = year1 > year2
True if year1 is later than year2.
bool = year1 >= year2
True if year1 is later or equal to year2.
bool = year1 < year2
True if year 1 earlier than year2.
bool = year1 <= year2
True if year 1 earlier or equal to year 2.
- Parameters
year (int) – A Hebrew year.
-
year
¶ The hebrew year.
- Type
int
-
leap
¶ True if the year is a leap year else false.
- Type
bool
-
iterdates
()[source]¶ Yield HebrewDate instance for each day of the year.
- Yields
HebrewDate – The next date of the Hebrew calendar year starting with the first of Tishrei.
-
pyluach.hebrewcal.
holiday
(date, israel=False)[source]¶ Return Jewish holiday of given date.
The holidays include the major and minor religious Jewish holidays including fast days.
- Parameters
date (
HebrewDate
,GregorianDate
, orJulianDay
) – Any date that implements ato_heb()
method which returns aHebrewDate
can be used.israel (boolian, optional) –
True
if you want the holidays according to the israel schedule. Defaults toFalse
.
- Returns
The name of the holiday or
None
if the given date is not a Jewish holiday.- Return type
str or
None