public class JewishCalendar extends JewishDate
| Modifier and Type | Field and Description |
|---|---|
static int |
CHANUKAH |
static int |
CHOL_HAMOED_PESACH |
static int |
CHOL_HAMOED_SUCCOS |
static int |
EREV_PESACH |
static int |
EREV_ROSH_HASHANA |
static int |
EREV_SHAVUOS |
static int |
EREV_SUCCOS |
static int |
EREV_YOM_KIPPUR |
static int |
FAST_OF_ESTHER |
static int |
FAST_OF_GEDALYAH |
static int |
HOSHANA_RABBA |
static int |
PESACH |
static int |
PESACH_SHENI |
static int |
PURIM |
static int |
PURIM_KATAN |
static int |
ROSH_CHODESH |
static int |
ROSH_HASHANA |
static int |
SEVENTEEN_OF_TAMMUZ |
static int |
SHAVUOS |
static int |
SHEMINI_ATZERES |
static int |
SHUSHAN_PURIM |
static int |
SIMCHAS_TORAH |
static int |
SUCCOS |
static int |
TENTH_OF_TEVES |
static int |
TISHA_BEAV |
static int |
TU_BEAV |
static int |
TU_BESHVAT |
static int |
YOM_HAATZMAUT |
static int |
YOM_HASHOAH |
static int |
YOM_HAZIKARON |
static int |
YOM_KIPPUR |
static int |
YOM_YERUSHALAYIM |
| Constructor and Description |
|---|
JewishCalendar()
Default constructor will set a default date to the current system date.
|
JewishCalendar(Calendar calendar)
A constructor that initializes the date to the
Calendar parameter. |
JewishCalendar(Date date)
A constructor that initializes the date to the
Date parameter. |
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 Israel
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
Daf |
getDafYomiBavli()
Returns the Daf Yomi (Bavli) 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 omer
|
boolean |
getInIsrael()
Gets whether Israel parsha and holiday scheme is used or not.
|
Date |
getMoladAsDate()
Returns the molad in Standard Time in Yerushalayim as a Date.
|
int |
getParshaIndex()
Returns a the index of today's parsha(ios) or a -1 if there is none.
|
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.
|
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 null if there is no holiday for this
day.
|
int |
hashCode() |
boolean |
isChanukah() |
boolean |
isCholHamoed()
Returns true if the current day is Chol Hamoed of Pesach or 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 |
isRoshChodesh()
Returns if the day is Rosh Chodesh.
|
boolean |
isTaanis()
Return true if the day is a Taanis (fast day).
|
boolean |
isUseModernHolidays()
Is this calendar set to return modern Israeli national holidays.
|
boolean |
isYomTov()
Returns true if the current day is Yom Tov.
|
void |
setInIsrael(boolean inIsrael)
Sets whether to use Israel parsha and holiday scheme or not.
|
void |
setUseModernHolidays(boolean useModernHolidays)
Seth the calendar to return modern Israeli national holidays.
|
back, clone, compareTo, forward, getAbsDate, getChalakimSinceMoladTohu, getCheshvanKislevKviah, getDayOfWeek, getDaysInJewishMonth, getDaysInJewishYear, getDaysInJewishYear, getGregorianDayOfMonth, getGregorianMonth, getGregorianYear, getJewishCalendarElapsedDays, getJewishDayOfMonth, getJewishMonth, getJewishYear, getLastDayOfGregorianMonth, getMolad, getMoladChalakim, getMoladHours, getMoladMinutes, getTime, isCheshvanLong, isJewishLeapYear, isKislevShort, resetDate, setDate, setDate, setGregorianDate, setGregorianDayOfMonth, setGregorianMonth, setGregorianYear, setJewishDate, setJewishDate, setJewishDayOfMonth, setJewishMonth, setJewishYear, setMoladChalakim, setMoladHours, setMoladMinutes, toStringpublic static final int EREV_PESACH
public static final int PESACH
public static final int CHOL_HAMOED_PESACH
public static final int PESACH_SHENI
public static final int EREV_SHAVUOS
public static final int SHAVUOS
public static final int SEVENTEEN_OF_TAMMUZ
public static final int TISHA_BEAV
public static final int TU_BEAV
public static final int EREV_ROSH_HASHANA
public static final int ROSH_HASHANA
public static final int FAST_OF_GEDALYAH
public static final int EREV_YOM_KIPPUR
public static final int YOM_KIPPUR
public static final int EREV_SUCCOS
public static final int SUCCOS
public static final int CHOL_HAMOED_SUCCOS
public static final int HOSHANA_RABBA
public static final int SHEMINI_ATZERES
public static final int SIMCHAS_TORAH
public static final int CHANUKAH
public static final int TENTH_OF_TEVES
public static final int TU_BESHVAT
public static final int FAST_OF_ESTHER
public static final int PURIM
public static final int SHUSHAN_PURIM
public static final int PURIM_KATAN
public static final int ROSH_CHODESH
public static final int YOM_HASHOAH
public static final int YOM_HAZIKARON
public static final int YOM_HAATZMAUT
public static final int YOM_YERUSHALAYIM
public JewishCalendar()
public JewishCalendar(Date date)
Date parameter.date - the Date to set the calendar topublic JewishCalendar(Calendar calendar)
Calendar parameter.calendar - the Calendar to set the calendar topublic JewishCalendar(int jewishYear, int jewishMonth, int jewishDayOfMonth)
jewishYear - the Jewish yearjewishMonth - the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the
constants JewishDate.NISSAN ... JewishDate.ADAR (or JewishDate.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 example JewishDate.IYAR,
or JewishDate.KISLEV in a year that JewishDate.isKislevShort()), the 29th (last valid date of the month)
will be setIllegalArgumentException - if the day of month is < 1 or > 30, or a year of < 0 is passed in.public JewishCalendar(int jewishYear, int jewishMonth, int jewishDayOfMonth, boolean inIsrael)
jewishYear - the Jewish yearjewishMonth - the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the
constants JewishDate.NISSAN ... JewishDate.ADAR (or JewishDate.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 example JewishDate.IYAR,
or JewishDate.KISLEV in a year that JewishDate.isKislevShort()), the 29th (last valid date of the month)
will be setinIsrael - whether in Israel. This affects Yom Tov and Parsha calculationspublic boolean isUseModernHolidays()
public void setUseModernHolidays(boolean useModernHolidays)
useModernHolidays - the useModernHolidays to setpublic void setInIsrael(boolean inIsrael)
inIsrael - set to true for calculations for Israelpublic boolean getInIsrael()
public int getYomTovIndex()
public boolean isYomTov()
isErevYomTov(),
isTaanis()public boolean isCholHamoed()
isYomTov(),
CHOL_HAMOED_PESACH,
CHOL_HAMOED_SUCCOSpublic boolean isErevYomTov()
isYomTov()public boolean isErevRoshChodesh()
isRoshChodesh()public boolean isTaanis()
public int getDayOfChanukah()
public boolean isChanukah()
public int getParshaIndex()
HebrewDateFormatter.formatParsha(JewishCalendar).
TODO: consider possibly return the parsha of the week for any day during the week instead of empty. To do this
the simple way, create a new instance of the class in the mothod, roll it to the next shabbos. If the shabbos has
no parsha, keep rolling by a week till a parsha is encountered. Possibly turn into static method that takes in a
year, month, day, roll to next shabbos (not that simple with the API for date passed in) and if it is not a
shabbos roll forwarde one week at a time to get the parsha. I do not think it is possible to have more than 2
shabbosim in a row without a parsha, but I may be wrong.public boolean isRoshChodesh()
public int getDayOfOmer()
public Date getMoladAsDate()
public Date getTchilasZmanKidushLevana3Days()
Tzais after to the time if the zman is between Alos
and Tzais.public Date getTchilasZmanKidushLevana7Days()
Tzais after to the time if the zman is between Alos and Tzais.public Date getSofZmanKidushLevanaBetweenMoldos()
Alos
prior to the time if the zman is between Alos and Tzais.getSofZmanKidushLevana15Days()public Date getSofZmanKidushLevana15Days()
half 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. TODO: Currently returns the time even if it is
during the day. It should return the Alos prior to the
time if the zman is between Alos and Tzais.getSofZmanKidushLevanaBetweenMoldos()public Daf getDafYomiBavli()
HebrewDateFormatter.formatDafYomiBavli(Daf) for the ability to format the daf in Hebrew or transliterated
masechta names.Dafpublic boolean equals(Object object)
equals in class JewishDateObject.equals(Object)public int hashCode()
hashCode in class JewishDateObject.hashCode()Copyright © 2004 - 2011 Eliyahu Hershfeld. All Rights Reserved. Released under the LGPL 2.1 license