Class JewishCalendar
java.lang.Object
com.kosherjava.zmanim.hebrewcalendar.JewishDate
com.kosherjava.zmanim.hebrewcalendar.JewishCalendar
- All Implemented Interfaces:
Cloneable
,Comparable<JewishDate>
public class JewishCalendar extends JewishDate
The JewishCalendar extends the JewishDate class and adds calendar methods.
This open source Java code was originally ported by Avrom Finkelstien
from his C++ code. It was refactored to fit the KosherJava Zmanim API with simplification of the code, enhancements
and some bug fixing. The class allows setting whether the holiday and parsha scheme follows the Israel scheme or outside Israel
scheme. The default is the outside Israel scheme.
The parsha code was ported by Y. Paritcher from his libzmanim code.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JewishCalendar.Parsha
List of parshiyos. -
Field Summary
Fields Modifier and Type Field Description static int
CHANUKAH
The holiday of Chanukah. 8 days starting on the 25th day Kislev.static int
CHOL_HAMOED_PESACH
Chol Hamoed (interim days) of Pesach (Passover)static int
CHOL_HAMOED_SUCCOS
Chol Hamoed (interim days) of Succos/Sukkos (Tabernacles)static int
EREV_PESACH
The 14th day of Nisan, the day before of Pesach (Passover).static int
EREV_ROSH_HASHANA
Erev Rosh Hashana (the day before Rosh Hashana), the 29th of Elulstatic int
EREV_SHAVUOS
Erev Shavuos (the day before Shavuos), the 5th of Sivanstatic int
EREV_SUCCOS
The 14th day of Tishrei, the day before of Succos/Sukkos (Tabernacles).static int
EREV_YOM_KIPPUR
The 9th day of Tishrei, the day before of Yom Kippur.static int
FAST_OF_ESTHER
The fast of Esther, usually on the 13th day of Adar (or Adar II on leap years).static int
FAST_OF_GEDALYAH
The fast of Gedalyah, the 3rd of Tishrei.static int
HOSHANA_RABBA
Hoshana Rabba, the 7th day of Succos/Sukkos that occurs on the 21st of Tishrei.private boolean
inIsrael
Is the calendar set to Israel, where some holidays have different rules.static int
LAG_BAOMER
The 33rd day of the Omer, the 18th of Iyar, a minor holiday.static JewishCalendar.Parsha[][]
parshalist
An array of parshiyos in the 17 possible combinations.static int
PESACH
The holiday of Pesach (Passover) on the 15th (and 16th out of Israel) day of Nisan.static int
PESACH_SHENI
Pesach Sheni, the 14th day of Iyar, a minor holiday.static int
PURIM
The holiday of Purim on the 14th day of Adar (or Adar II on leap years).static int
PURIM_KATAN
The holiday of Purim Katan on the 14th day of Adar I on a leap year when Purim is on Adar II, a minor holiday.static int
ROSH_CHODESH
Rosh Chodesh, the new moon on the first day of the Jewish month, and the 30th day of the previous month in the case of a month with 30 days.static int
ROSH_HASHANA
Rosh Hashana, the first of Tishrei.static int
SEVENTEEN_OF_TAMMUZ
The fast of the 17th day of Tamuzstatic int
SHAVUOS
Shavuos (Pentecost), the 6th of Sivanstatic int
SHEMINI_ATZERES
Shmini Atzeres, the 8th day of Succos/Sukkos is an independent holiday that occurs on the 22nd of Tishrei.static int
SHUSHAN_PURIM
The holiday of Shushan Purim on the 15th day of Adar (or Adar II on leap years).static int
SHUSHAN_PURIM_KATAN
The holiday of Purim Katan on the 15th day of Adar I on a leap year when Purim is on Adar II, a minor holiday.static int
SIMCHAS_TORAH
Simchas Torah, the 9th day of Succos/Sukkos, or the second day of Shmini Atzeres that is celebratedout of Israel
on the 23rd of Tishrei.static int
SUCCOS
The holiday of Succos/Sukkos (Tabernacles), the 15th (and 16th out of Israel) day of Tishreistatic int
TENTH_OF_TEVES
The fast of the 10th day of Teves.static int
TISHA_BEAV
The fast of the 9th of Avstatic int
TU_BEAV
The 15th day of Av, a minor holidaystatic int
TU_BESHVAT
Tu Bishvat on the 15th day of Shevat, a minor holiday.private boolean
useModernHolidays
Is the calendar set to use modern Israeli holidays such as Yom Haatzmaut.static int
YOM_HAATZMAUT
Yom Ha'atzmaut, Israel Independence Day, the 5th of Iyar, but if it occurs on a Friday or Saturday, the holiday is moved back to Thursday, the 3rd of 4th of Iyar, and if it falls on a Monday, it is moved forward to Tuesday the 6th of Iyar.static int
YOM_HASHOAH
Yom HaShoah, Holocaust Remembrance Day, usually held on the 27th of Nisan.static int
YOM_HAZIKARON
Yom HaZikaron, Israeli Memorial Day, held a day before Yom Ha'atzmaut.static int
YOM_KIPPUR
The holiday of Yom Kippur, the 10th day of Tishreistatic int
YOM_YERUSHALAYIM
Yom Yerushalayim or Jerusalem Day, on 28 Iyar. -
Constructor Summary
Constructors Constructor Description JewishCalendar()
Default constructor will set a default date to the current system date.JewishCalendar(int jewishYear, int jewishMonth, int jewishDayOfMonth)
Creates a Jewish date based on a Jewish year, month and day of month.JewishCalendar(int jewishYear, int jewishMonth, int jewishDayOfMonth, boolean inIsrael)
Creates a Jewish date based on a Jewish date and whether in IsraelJewishCalendar(LocalDate localDate)
A constructor that initializes the date to theLocalDate
parameter.JewishCalendar(Calendar calendar)
A constructor that initializes the date to theCalendar
parameter.JewishCalendar(Date date)
A constructor that initializes the date to theDate
parameter. -
Method Summary
Modifier and Type Method Description boolean
equals(Object object)
Indicates whether some other object is "equal to" this one.Daf
getDafYomiBavli()
Returns the Daf Yomi (Bavli) for the date that the calendar is set to.Daf
getDafYomiYerushalmi()
Returns the Daf Yomi (Yerushalmi) for the date that the calendar is set to.int
getDayOfChanukah()
Returns the day of Chanukah or -1 if it is not Chanukah.int
getDayOfOmer()
Returns the int value of the Omer day or -1 if the day is not in the omerboolean
getInIsrael()
Gets whether Israel holiday scheme is used or not.Date
getMoladAsDate()
Returns the molad in Standard Time in Yerushalayim as a Date.JewishCalendar.Parsha
getParshah()
Returns this week'sJewishCalendar.Parsha
if it is Shabbos.private int
getParshaYearType()
Return the type of year for parsha calculations.Date
getSofZmanKidushLevana15Days()
Returns the latest time of Kiddush Levana calculated as 15 days after the molad.Date
getSofZmanKidushLevanaBetweenMoldos()
Returns the latest time of Kiddush Levana according to the Maharil's opinion that it is calculated as halfway between molad and molad.JewishCalendar.Parsha
getSpecialShabbos()
Returns a parsha enum if the Shabbos is one of the four parshiyos of Parsha.SHKALIM, Parsha.ZACHOR, Parsha.PARA, Parsha.HACHODESH or Parsha.NONE for a regular Shabbos (or any weekday).Date
getTchilasZmanKidushLevana3Days()
Returns the earliest time of Kiddush Levana calculated as 3 days after the molad.Date
getTchilasZmanKidushLevana7Days()
Returns the earliest time of Kiddush Levana calculated as 7 days after the molad as mentioned by the Mechaber.int
getYomTovIndex()
Returns an index of the Jewish holiday or fast day for the current day, or a -1 if there is no holiday for this day.boolean
hasCandleLighting()
Returns true if the day has candle lighting.int
hashCode()
OverridesObject.hashCode()
.boolean
isAseresYemeiTeshuva()
Returns true if the current day is Aseret Yemei Teshuva.boolean
isAssurBemelacha()
Returns true if it is Shabbos or if it is a Yom Tov day that has a melacha (work) prohibition.boolean
isBirkasHachamah()
Birkas Hachamah is recited every 28 years based on Tekufas Shmulel (Julian years) that a year is 365.25 days.boolean
isChanukah()
Returns true if the current day is one of the 8 days of Chanukah.boolean
isCholHamoed()
Returns true if the current day is Chol Hamoed of Pesach or Succos.boolean
isCholHamoedPesach()
Returns true if the current day is Chol Hamoed of Pesach.boolean
isCholHamoedSuccos()
Returns true if the current day is Chol Hamoed of Succos.boolean
isErevRoshChodesh()
Returns true if the current day is Erev Rosh Chodesh.boolean
isErevYomTov()
Returns true if the current day is erev Yom Tov.boolean
isErevYomTovSheni()
Returns true if the day is the second day of Yom Tov.boolean
isMacharChodesh()
Returns if the day is Shabbos and sunday is Rosh Chodesh.boolean
isRoshChodesh()
Returns if the day is Rosh Chodesh.boolean
isShabbosMevorchim()
Returns if the day is Shabbos Mevorchim.boolean
isTaanis()
Return true if the day is a Taanis (fast day).boolean
isTomorrowShabbosOrYomTov()
Returns true if tomorrow is Shabbos or Yom Tov.boolean
isUseModernHolidays()
Is this calendar set to return modern Israeli national holidays.boolean
isYomTov()
Returns true if the current day is Yom Tov.boolean
isYomTovAssurBemelacha()
Returns true if the Yom Tov day has a melacha (work) prohibition.void
setInIsrael(boolean inIsrael)
Sets whether to use Israel holiday scheme or not.void
setUseModernHolidays(boolean useModernHolidays)
Seth the calendar to return modern Israeli national holidays.Methods inherited from class com.kosherjava.zmanim.hebrewcalendar.JewishDate
back, clone, compareTo, forward, getAbsDate, getChalakimSinceMoladTohu, getCheshvanKislevKviah, getDayOfWeek, getDaysInJewishMonth, getDaysInJewishYear, getDaysInJewishYear, getDaysSinceStartOfJewishYear, getGregorianCalendar, getGregorianDayOfMonth, getGregorianMonth, getGregorianYear, getJewishCalendarElapsedDays, getJewishDayOfMonth, getJewishMonth, getJewishYear, getLastDayOfGregorianMonth, getLocalDate, getMolad, getMoladChalakim, getMoladHours, getMoladMinutes, isCheshvanLong, isJewishLeapYear, isKislevShort, resetDate, setDate, setDate, setDate, setGregorianDate, setGregorianDayOfMonth, setGregorianMonth, setGregorianYear, setJewishDate, setJewishDate, setJewishDayOfMonth, setJewishMonth, setJewishYear, setMoladChalakim, setMoladHours, setMoladMinutes, toString
-
Field Details
-
EREV_PESACH
The 14th day of Nisan, the day before of Pesach (Passover).- See Also:
- Constant Field Values
-
PESACH
The holiday of Pesach (Passover) on the 15th (and 16th out of Israel) day of Nisan.- See Also:
- Constant Field Values
-
CHOL_HAMOED_PESACH
Chol Hamoed (interim days) of Pesach (Passover)- See Also:
- Constant Field Values
-
PESACH_SHENI
Pesach Sheni, the 14th day of Iyar, a minor holiday.- See Also:
- Constant Field Values
-
EREV_SHAVUOS
Erev Shavuos (the day before Shavuos), the 5th of Sivan- See Also:
- Constant Field Values
-
SHAVUOS
Shavuos (Pentecost), the 6th of Sivan- See Also:
- Constant Field Values
-
SEVENTEEN_OF_TAMMUZ
The fast of the 17th day of Tamuz- See Also:
- Constant Field Values
-
TISHA_BEAV
The fast of the 9th of Av- See Also:
- Constant Field Values
-
TU_BEAV
The 15th day of Av, a minor holiday- See Also:
- Constant Field Values
-
EREV_ROSH_HASHANA
Erev Rosh Hashana (the day before Rosh Hashana), the 29th of Elul- See Also:
- Constant Field Values
-
ROSH_HASHANA
Rosh Hashana, the first of Tishrei.- See Also:
- Constant Field Values
-
FAST_OF_GEDALYAH
The fast of Gedalyah, the 3rd of Tishrei.- See Also:
- Constant Field Values
-
EREV_YOM_KIPPUR
The 9th day of Tishrei, the day before of Yom Kippur.- See Also:
- Constant Field Values
-
YOM_KIPPUR
The holiday of Yom Kippur, the 10th day of Tishrei- See Also:
- Constant Field Values
-
EREV_SUCCOS
The 14th day of Tishrei, the day before of Succos/Sukkos (Tabernacles).- See Also:
- Constant Field Values
-
SUCCOS
The holiday of Succos/Sukkos (Tabernacles), the 15th (and 16th out of Israel) day of Tishrei- See Also:
- Constant Field Values
-
CHOL_HAMOED_SUCCOS
Chol Hamoed (interim days) of Succos/Sukkos (Tabernacles)- See Also:
- Constant Field Values
-
HOSHANA_RABBA
Hoshana Rabba, the 7th day of Succos/Sukkos that occurs on the 21st of Tishrei.- See Also:
- Constant Field Values
-
SHEMINI_ATZERES
Shmini Atzeres, the 8th day of Succos/Sukkos is an independent holiday that occurs on the 22nd of Tishrei.- See Also:
- Constant Field Values
-
SIMCHAS_TORAH
Simchas Torah, the 9th day of Succos/Sukkos, or the second day of Shmini Atzeres that is celebratedout of Israel
on the 23rd of Tishrei.- See Also:
- Constant Field Values
-
CHANUKAH
The holiday of Chanukah. 8 days starting on the 25th day Kislev.- See Also:
- Constant Field Values
-
TENTH_OF_TEVES
The fast of the 10th day of Teves.- See Also:
- Constant Field Values
-
TU_BESHVAT
Tu Bishvat on the 15th day of Shevat, a minor holiday.- See Also:
- Constant Field Values
-
FAST_OF_ESTHER
The fast of Esther, usually on the 13th day of Adar (or Adar II on leap years). It is earlier on some years.- See Also:
- Constant Field Values
-
PURIM
The holiday of Purim on the 14th day of Adar (or Adar II on leap years).- See Also:
- Constant Field Values
-
SHUSHAN_PURIM
The holiday of Shushan Purim on the 15th day of Adar (or Adar II on leap years).- See Also:
- Constant Field Values
-
PURIM_KATAN
The holiday of Purim Katan on the 14th day of Adar I on a leap year when Purim is on Adar II, a minor holiday.- See Also:
- Constant Field Values
-
ROSH_CHODESH
Rosh Chodesh, the new moon on the first day of the Jewish month, and the 30th day of the previous month in the case of a month with 30 days.- See Also:
- Constant Field Values
-
YOM_HASHOAH
Yom HaShoah, Holocaust Remembrance Day, usually held on the 27th of Nisan. If it falls on a Friday, it is moved to the 26th, and if it falls on a Sunday it is moved to the 28th. Amodern holiday
.- See Also:
- Constant Field Values
-
YOM_HAZIKARON
Yom HaZikaron, Israeli Memorial Day, held a day before Yom Ha'atzmaut. Amodern holiday
.- See Also:
- Constant Field Values
-
YOM_HAATZMAUT
Yom Ha'atzmaut, Israel Independence Day, the 5th of Iyar, but if it occurs on a Friday or Saturday, the holiday is moved back to Thursday, the 3rd of 4th of Iyar, and if it falls on a Monday, it is moved forward to Tuesday the 6th of Iyar. Amodern holiday
.- See Also:
- Constant Field Values
-
YOM_YERUSHALAYIM
Yom Yerushalayim or Jerusalem Day, on 28 Iyar. Amodern holiday
.- See Also:
- Constant Field Values
-
LAG_BAOMER
The 33rd day of the Omer, the 18th of Iyar, a minor holiday.- See Also:
- Constant Field Values
-
SHUSHAN_PURIM_KATAN
The holiday of Purim Katan on the 15th day of Adar I on a leap year when Purim is on Adar II, a minor holiday.- See Also:
- Constant Field Values
-
inIsrael
Is the calendar set to Israel, where some holidays have different rules.- See Also:
getInIsrael()
,setInIsrael(boolean)
-
useModernHolidays
Is the calendar set to use modern Israeli holidays such as Yom Haatzmaut. -
parshalist
An array of parshiyos in the 17 possible combinations.
-
-
Constructor Details
-
JewishCalendar
public JewishCalendar()Default constructor will set a default date to the current system date. -
JewishCalendar
A constructor that initializes the date to theDate
parameter.- Parameters:
date
- theDate
to set the calendar to
-
JewishCalendar
A constructor that initializes the date to theCalendar
parameter.- Parameters:
calendar
- theCalendar
to set the calendar to
-
JewishCalendar
A constructor that initializes the date to theLocalDate
parameter.- Parameters:
localDate
- theLocalDate
to set the calendar to
-
JewishCalendar
Creates a Jewish date based on a Jewish year, month and day of month.- Parameters:
jewishYear
- the Jewish yearjewishMonth
- the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the constantsJewishDate.NISSAN
...JewishDate.ADAR
(orJewishDate.ADAR_II
for a leap year Adar II) to avoid any confusion.jewishDayOfMonth
- the Jewish day of month. If 30 is passed in for a month with only 29 days (for exampleJewishDate.IYAR
, orJewishDate.KISLEV
in a year thatJewishDate.isKislevShort()
), the 29th (last valid date of the month) will be set- Throws:
IllegalArgumentException
- if the day of month is < 1 or > 30, or a year of < 0 is passed in.
-
JewishCalendar
Creates a Jewish date based on a Jewish date and whether in Israel- Parameters:
jewishYear
- the Jewish yearjewishMonth
- the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the constantsJewishDate.NISSAN
...JewishDate.ADAR
(orJewishDate.ADAR_II
for a leap year Adar II) to avoid any confusion.jewishDayOfMonth
- the Jewish day of month. If 30 is passed in for a month with only 29 days (for exampleJewishDate.IYAR
, orJewishDate.KISLEV
in a year thatJewishDate.isKislevShort()
), the 29th (last valid date of the month) will be setinIsrael
- whether in Israel. This affects Yom Tov calculations
-
-
Method Details
-
isUseModernHolidays
Is this calendar set to return modern Israeli national holidays. By default this value is false. The holidays are: "Yom HaShoah", "Yom Hazikaron", "Yom Ha'atzmaut" and "Yom Yerushalayim"- Returns:
- the useModernHolidays true if set to return modern Israeli national holidays
-
setUseModernHolidays
Seth the calendar to return modern Israeli national holidays. By default this value is false. The holidays are: "Yom HaShoah", "Yom Hazikaron", "Yom Ha'atzmaut" and "Yom Yerushalayim"- Parameters:
useModernHolidays
- the useModernHolidays to set
-
setInIsrael
Sets whether to use Israel holiday scheme or not. Default is false.- Parameters:
inIsrael
- set to true for calculations for Israel
-
getInIsrael
Gets whether Israel holiday scheme is used or not. The default (if not set) is false.- Returns:
- if the if the calendar is set to Israel
-
isBirkasHachamah
Birkas Hachamah is recited every 28 years based on Tekufas Shmulel (Julian years) that a year is 365.25 days. The Rambam in Hilchos Kiddush Hachodesh 9:3 states that tekufas Nisan of year 1 was 7 days + 9 hours before molad Nisan. This is calculated as every 10,227 days (28 * 365.25).- Returns:
- true for a day that Birkas Hachamah is recited.
-
getParshaYearType
Return the type of year for parsha calculations. The algorithm follows the Luach Arba'ah Shearim in the Tur Ohr Hachaim.- Returns:
- the type of year for parsha calculations.
-
getParshah
Returns this week'sJewishCalendar.Parsha
if it is Shabbos. returns Parsha.NONE if a weekday or if there is no parshah that week (for example Yomtov is on Shabbos)- Returns:
- the current parsha
-
getSpecialShabbos
Returns a parsha enum if the Shabbos is one of the four parshiyos of Parsha.SHKALIM, Parsha.ZACHOR, Parsha.PARA, Parsha.HACHODESH or Parsha.NONE for a regular Shabbos (or any weekday).- Returns:
- one of the four parshiyos of Parsha.SHKALIM, Parsha.ZACHOR, Parsha.PARA, Parsha.HACHODESH or Parsha.NONE.
-
getYomTovIndex
Returns an index of the Jewish holiday or fast day for the current day, or a -1 if there is no holiday for this day. There are constants in this class representing each Yom Tov. Formatting of the Yomim tovim is done in the ZmanimFormatter#- Returns:
- the index of the holiday such as the constant
LAG_BAOMER
orYOM_KIPPUR
or a -1 if it is not a holiday. - See Also:
HebrewDateFormatter
- TODO:
- consider using enums instead of the constant ints.
-
isYomTov
Returns true if the current day is Yom Tov. The method returns true even for holidays such asCHANUKAH
and minor ones such asTU_BEAV
andPESACH_SHENI
. Erev Yom Tov (with the exception ofHOSHANA_RABBA
, Erev the second days of Pesach) returns false, as dofast days
besidesYOM_KIPPUR
. UseisAssurBemelacha()
to find the days that have a prohibition of work.- Returns:
- true if the current day is a Yom Tov
- See Also:
getYomTovIndex()
,isErevYomTov()
,isErevYomTovSheni()
,isTaanis()
,isAssurBemelacha()
,isCholHamoed()
-
isYomTovAssurBemelacha
Returns true if the Yom Tov day has a melacha (work) prohibition. This method will return false for a non-Yom Tov day, even if it is Shabbos.- Returns:
- if the Yom Tov day has a melacha (work) prohibition.
-
isAssurBemelacha
Returns true if it is Shabbos or if it is a Yom Tov day that has a melacha (work) prohibition. This method will return false for a.- Returns:
- if the day is a Yom Tov that is assur bemlacha or Shabbos
-
hasCandleLighting
Returns true if the day has candle lighting. This will return true on erev Shabbos, erev Yom Tov, the first day of Rosh Hashana and the first days of Yom Tov out of Israel. It is identical to callingisTomorrowShabbosOrYomTov()
.- Returns:
- if the day has candle lighting
-
isTomorrowShabbosOrYomTov
Returns true if tomorrow is Shabbos or Yom Tov. This will return true on erev Shabbos, erev Yom Tov, the first day of Rosh Hashana and erev the first days of Yom Tov out of Israel. It is identical to callinghasCandleLighting()
.- Returns:
- will return if the next day is Shabbos or Yom Tov
-
isErevYomTovSheni
Returns true if the day is the second day of Yom Tov. This impacts the second day of Rosh Hashana everywhere and the second days of Yom Tov in chutz laaretz (out of Israel).- Returns:
- if the day is the second day of Yom Tov.
-
isAseresYemeiTeshuva
Returns true if the current day is Aseret Yemei Teshuva.- Returns:
- if the current day is Aseret Yemei Teshuvah
-
isCholHamoed
Returns true if the current day is Chol Hamoed of Pesach or Succos.- Returns:
- true if the current day is Chol Hamoed of Pesach or Succos
- See Also:
isYomTov()
,CHOL_HAMOED_PESACH
,CHOL_HAMOED_SUCCOS
-
isCholHamoedPesach
Returns true if the current day is Chol Hamoed of Pesach.- Returns:
- true if the current day is Chol Hamoed of Pesach
- See Also:
isYomTov()
,CHOL_HAMOED_PESACH
-
isCholHamoedSuccos
Returns true if the current day is Chol Hamoed of Succos.- Returns:
- true if the current day is Chol Hamoed of Succos
- See Also:
isYomTov()
,CHOL_HAMOED_SUCCOS
-
isErevYomTov
Returns true if the current day is erev Yom Tov. The method returns true for Erev - Pesach (first and last days), Shavuos, Rosh Hashana, Yom Kippur and Succos and Hoshana Rabba.- Returns:
- true if the current day is Erev - Pesach, Shavuos, Rosh Hashana, Yom Kippur and Succos
- See Also:
isYomTov()
,isErevYomTovSheni()
-
isErevRoshChodesh
Returns true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana- Returns:
- true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana
- See Also:
isRoshChodesh()
-
isTaanis
Return true if the day is a Taanis (fast day). Return true for 17 of Tammuz, Tisha B'Av, Yom Kippur, Fast of Gedalyah, 10 of Teves and the Fast of Esther- Returns:
- true if today is a fast day
-
getDayOfChanukah
Returns the day of Chanukah or -1 if it is not Chanukah.- Returns:
- the day of Chanukah or -1 if it is not Chanukah.
- See Also:
isChanukah()
-
isChanukah
Returns true if the current day is one of the 8 days of Chanukah.- Returns:
- if the current day is one of the 8 days of Chanukah.
- See Also:
getDayOfChanukah()
-
isRoshChodesh
Returns if the day is Rosh Chodesh. Rosh Hashana will return false- Returns:
- true if it is Rosh Chodesh. Rosh Hashana will return false
-
isMacharChodesh
Returns if the day is Shabbos and sunday is Rosh Chodesh.- Returns:
- true if it is Shabbos and sunday is Rosh Chodesh.
-
isShabbosMevorchim
Returns if the day is Shabbos Mevorchim.- Returns:
- true if it is Shabbos Mevorchim.
-
getDayOfOmer
Returns the int value of the Omer day or -1 if the day is not in the omer- Returns:
- The Omer count as an int or -1 if it is not a day of the Omer.
-
getMoladAsDate
Returns the molad in Standard Time in Yerushalayim as a Date. The traditional calculation uses local time. This method subtracts 20.94 minutes (20 minutes and 56.496 seconds) from the local time (Har Habayis with a longitude of 35.2354° is 5.2354° away from the %15 timezone longitude) to get to standard time. This method intentionally uses standard time and not dailight savings time. Java will implicitly format the time to the default (or set) Timezone.- Returns:
- the Date representing the moment of the molad in Yerushalayim standard time (GMT + 2)
-
getTchilasZmanKidushLevana3Days
Returns the earliest time of Kiddush Levana calculated as 3 days after the molad. This method returns the time even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider displaying the next tzais if the zman is between alos and tzais.- Returns:
- the Date representing the moment 3 days after the molad.
- See Also:
ComplexZmanimCalendar.getTchilasZmanKidushLevana3Days()
,ComplexZmanimCalendar.getTchilasZmanKidushLevana3Days(Date, Date)
-
getTchilasZmanKidushLevana7Days
Returns the earliest time of Kiddush Levana calculated as 7 days after the molad as mentioned by the Mechaber. See the Bach's opinion on this time. This method returns the time even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider displaying the next tzais if the zman is between alos and tzais.- Returns:
- the Date representing the moment 7 days after the molad.
- See Also:
ComplexZmanimCalendar.getTchilasZmanKidushLevana7Days()
,ComplexZmanimCalendar.getTchilasZmanKidushLevana7Days(Date, Date)
-
getSofZmanKidushLevanaBetweenMoldos
Returns the latest time of Kiddush Levana according to the Maharil's opinion that it is calculated as halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between molad and molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. This method returns the time even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider displaying alos before this time if the zman is between alos and tzais.- Returns:
- the Date representing the moment halfway between molad and molad.
- See Also:
getSofZmanKidushLevana15Days()
,ComplexZmanimCalendar.getSofZmanKidushLevanaBetweenMoldos()
,ComplexZmanimCalendar.getSofZmanKidushLevanaBetweenMoldos(Date, Date)
-
getSofZmanKidushLevana15Days
Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the opinion brought down in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the Rema who brings down the opinion of the Maharil's of calculatinghalf way between molad and mold
is of the opinion that Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi Dovid Heber's very detailed writeup in Siman Daled (chapter 4) of Shaarei Zmanim. This method returns the time even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider displaying alos before this time if the zman is between alos and tzais.- Returns:
- the Date representing the moment 15 days after the molad.
- See Also:
getSofZmanKidushLevanaBetweenMoldos()
,ComplexZmanimCalendar.getSofZmanKidushLevana15Days()
,ComplexZmanimCalendar.getSofZmanKidushLevana15Days(Date, Date)
-
getDafYomiBavli
Returns the Daf Yomi (Bavli) for the date that the calendar is set to. See theHebrewDateFormatter.formatDafYomiBavli(Daf)
for the ability to format the daf in Hebrew or transliterated masechta names.- Returns:
- the daf as a
Daf
-
getDafYomiYerushalmi
Returns the Daf Yomi (Yerushalmi) for the date that the calendar is set to. See theHebrewDateFormatter.formatDafYomiYerushalmi(Daf)
for the ability to format the daf in Hebrew or transliterated masechta names.- Returns:
- the daf as a
Daf
-
equals
Indicates whether some other object is "equal to" this one.- Overrides:
equals
in classJewishDate
- See Also:
Object.equals(Object)
-
hashCode
OverridesObject.hashCode()
.- Overrides:
hashCode
in classJewishDate
- See Also:
Object.hashCode()
-