JewishCalendar class

Inheritance

Constructors

JewishCalendar()
Default constructor will set a default date to the current system date.
JewishCalendar.fromDateTime(DateTime dateTime)
A constructor that initializes the date to the {@link java.util.Date Date} parameter. [...]
JewishCalendar.initDate(int jewishYear, int jewishMonth, int jewishDayOfMonth, {bool inIsrael: false})
Creates a Jewish date based on a Jewish date and whether in Israel [...]

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

back() → void
Rolls the date back by 1 day. It modifies both the Gregorian and Jewish dates accordingly. The API does not currently offer the ability to forward more than one day t a time, or to forward by month or year. If such manipulation is required use the {@link Calendar} class {@link Calendar#add(int, int)} or {@link Calendar#roll(int, int)} methods in the following manner. [...]
inherited
clone() Object
A method that creates a deep copy of the object. [...]
inherited
compareTo(JewishDate jewishDate) int
Compares two dates as per the compareTo() method in the Comparable interface. Returns a value less than 0 if this date is "less than" (before) the date, greater than 0 if this date is "greater than" (after) the date, or 0 if they are equal.
inherited
equals(Object object) bool
@see Object#equals(Object)#
inherited
forward([Calendar field = Calendar.DATE, int amount = 1]) → void
Rolls the date, month or year forward by the amount passed in. It modifies both the Gregorian and Jewish dates accordingly. If manipulation beyond the fields supported here is required, use the {@link Calendar} class {@link Calendar#add(int, int)} or {@link Calendar#roll(int, int)} methods in the following manner. [...]
inherited
getAbsDate() int
Returns the absolute date (days since January 1, 0001 on the Gregorian calendar). [...]
inherited
getChalakimSinceMoladTohu() double
Returns the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu to the Jewish year and month that this Object is set to. [...]
inherited
getCheshvanKislevKviah() int
Returns the Cheshvan and Kislev kviah (whether a Jewish year is short, regular or long). It will return {@link #SHELAIMIM} if both cheshvan and kislev are 30 days, {@link #KESIDRAN} if Cheshvan is 29 days and Kislev is 30 days and {@link #CHASERIM} if both are 29 days. [...]
inherited
getDafYomiBavli() Daf
Returns the Daf Yomi (Bavli) for the date that the calendar is set to. See the {@link HebrewDateFormatter#formatDafYomiBavli(Daf)} for the ability to format the daf in Hebrew or transliterated masechta names. [...]
getDafYomiYerushalmi() Daf
Returns the Daf Yomi (Yerushalmi) for the date that the calendar is set to. See the {@link HebrewDateFormatter#formatDafYomiYerushalmi(Daf)} for the ability to format the daf in Hebrew or transliterated masechta names. [...]
getDayOfChanukah() int
Returns the day of Chanukah or -1 if it is not Chanukah. [...]
getDayOfOmer() int
Returns the int value of the Omer day or -1 if the day is not in the omer [...]
getDayOfWeek() int
Returns the day of the week as a number between 1-7. [...]
inherited
getDaysInJewishMonth() int
Returns the number of days of the Jewish month that the calendar is currently set to. [...]
inherited
getDaysInJewishYear() int
Returns the number of days for the current year that the calendar is set to. [...]
inherited
getDaysSinceStartOfJewishYear() int
returns the number of days from Rosh Hashana of the date passed in, to the full date passed in. [...]
inherited
getGregorianCalendar() DateTime
Returns this object's date as a {@link java.util.Calendar} object. [...]
inherited
getGregorianDayOfMonth() int
Returns the Gregorian day of the month. [...]
inherited
getGregorianMonth() int
Returns the Gregorian month (between 0-11). [...]
inherited
getGregorianYear() int
Returns the Gregotian year. [...]
inherited
getInIsrael() bool
Gets whether Israel holiday scheme is used or not. The default (if not set) is false. [...]
getJewishDayOfMonth() int
Returns the Jewish day of month. [...]
inherited
getJewishMonth() int
Returns the Jewish month 1-12 (or 13 years in a leap year). The month count starts with 1 for Nisan and goes to 13 for Adar II [...]
inherited
getJewishYear() int
Returns the Jewish year. [...]
inherited
getLastDayOfGregorianMonth(int month) int
Returns the last day in a gregorian month [...]
inherited
getMolad() JewishDate
Returns the molad for a given year and month. Returns a JewishDate {@link Object} set to the date of the molad with the {@link #getMoladHours() hours}, {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim() chalakim} set. In the current implementation, it sets the molad time based on a midnight date rollover. This means that Rosh Chodesh Adar II, 5771 with a molad of 7 chalakim past midnight on Shabbos 29 Adar I / March 5, 2011 12:00 AM and 7 chalakim, will have the following values: hours: 0, minutes: 0, Chalakim: 7. [...]
inherited
getMoladAsDateTime() DateTime
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. [...]
getMoladChalakim() int
Returns the molad chalakim/parts. Only an object populated with {@link #getMolad()}, {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladChalakim(int)} will have these fields populated. A regular JewishDate object will have this field set to 0. [...]
inherited
getMoladHours() int
Returns the molad hours. Only a JewishDate object populated with {@link #getMolad()}, {@link #setJewishDate(int, int, int, int, int, int)} or {@link #setMoladHours(int)} will have this field populated. A regular JewishDate object will have this field set to 0. [...]
inherited
getMoladMinutes() int
Returns the molad minutes. Only an object populated with {@link #getMolad()}, {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladMinutes(int)} will have these fields populated. A regular JewishDate object will have this field set to 0. [...]
inherited
getParshah() Parsha
Returns this week's {@link 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) @return the current parsha
getSofZmanKidushLevana15Days() DateTime
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 calculating {@link #getSofZmanKidushLevanaBetweenMoldos() 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. 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. [...]
getSofZmanKidushLevanaBetweenMoldos() DateTime
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. [...]
getSpecialShabbos() Parsha
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). @return one of the four parshiyos of Parsha.SHKALIM, Parsha.ZACHOR, Parsha.PARA, Parsha.HACHODESH or Parsha.NONE.
getTchilasZmanKidushLevana3Days() DateTime
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. [...]
getTchilasZmanKidushLevana7Days() DateTime
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. [...]
getYomTovIndex() int
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. [...]
hasCandleLighting() bool
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 calling {@link #isTomorrowShabbosOrYomTov()}. [...]
isAseresYemeiTeshuva() bool
Returns true if the current day is Aseret Yemei Teshuva. [...]
isAssurBemelacha() bool
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. @return if the day is a Yom Tov that is assur bemlacha or Shabbos
isBirkasHachamah() bool
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). @return true for a day that Birkas Hachamah is recited.
isChanukah() bool
isCheshvanLong() bool
Returns if Cheshvan is long (30 days VS 29 days) for the current year that the calendar is set to. The method name isLong is done since in a Kesidran (ordered) year Cheshvan is short. [...]
inherited
isCholHamoed() bool
Returns true if the current day is Chol Hamoed of Pesach or Succos. [...]
isCholHamoedPesach() bool
Returns true if the current day is Chol Hamoed of Pesach. [...]
isCholHamoedSuccos() bool
Returns true if the current day is Chol Hamoed of Succos. [...]
isErevRoshChodesh() bool
Returns true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana [...]
isErevYomTov() bool
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. [...]
isErevYomTovSheni() bool
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). [...]
isJewishLeapYear() bool
Returns if the year the calendar is set to is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year cycle are leap years. [...]
inherited
isKislevShort() bool
Returns if the Kislev is short for the year that this class is set to. The method name isShort is done since in a Kesidran (ordered) year Kislev is long. [...]
inherited
isMacharChodesh() bool
Returns if the day is Shabbos and sunday is Rosh Chodesh. [...]
isRoshChodesh() bool
Returns if the day is Rosh Chodesh. Rosh Hashana will return false [...]
isShabbosMevorchim() bool
Returns if the day is Shabbos Mevorchim. [...]
isTaanis() bool
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 [...]
isTomorrowShabbosOrYomTov() bool
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 calling {@link #hasCandleLighting()}. @return will return if the next day is Shabbos or Yom Tov
isUseModernHolidays() bool
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" [...]
isYomTov() bool
Returns true if the current day is Yom Tov. The method returns false for Chanukah, Erev Yom Tov (with the exception of Hoshana Rabba and Erev the second days of Pesach) and fast days. [...]
isYomTovAssurBemelacha() bool
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. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
resetDate() → void
Resets this date to the current system date.
inherited
setDate(DateTime dateTime) → void
Sets the date based on a {@link java.util.Calendar Calendar} object. Modifies the Jewish date as well. [...]
inherited
setGregorianDate(int year, int month, int dayOfMonth) → void
Sets the Gregorian Date, and updates the Jewish date accordingly. Like the Java Calendar A value of 0 is expected for January. [...]
inherited
setGregorianDayOfMonth(int dayOfMonth) → void
sets the Gregorian Day of month. [...]
inherited
setGregorianMonth(int month) → void
Sets the Gregorian month. [...]
inherited
setGregorianYear(int year) → void
sets the Gregorian year. [...]
inherited
setInIsrael(bool inIsrael) → void
Sets whether to use Israel holiday scheme or not. Default is false. [...]
setJewishDate(int year, int month, int dayOfMonth, [int hours = 0, int minutes = 0, int chalakim = 0]) → void
Sets the Jewish Date and updates the Gregorian date accordingly. [...]
inherited
setJewishDayOfMonth(int dayOfMonth) → void
sets the Jewish day of month. [...]
inherited
setJewishMonth(int month) → void
sets the Jewish month. [...]
inherited
setJewishYear(int year) → void
sets the Jewish year. [...]
inherited
setMoladChalakim(int moladChalakim) → void
Sets the molad chalakim/parts. The expectation is that the traditional minute-less chalakim will be broken out to {@link #setMoladMinutes(int) minutes} and chalakim, so 793 (TaShTZaG) parts would have the minutes set to 44 and chalakim to 1. [...]
inherited
setMoladHours(int moladHours) → void
Sets the molad hours. [...]
inherited
setMoladMinutes(int moladMinutes) → void
Sets the molad minutes. The expectation is that the traditional minute-less chalakim will be broken out to minutes and {@link #setMoladChalakim(int) chalakim/parts} , so 793 (TaShTZaG) parts would have the minutes set to 44 and chalakim to 1. [...]
inherited
setUseModernHolidays(bool useModernHolidays) → void
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" [...]
toString() String
Returns a string containing the Jewish date in the form, "day Month, year" e.g. "21 Shevat, 5729". For more complex formatting, use the formatter classes. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Constants

CHANUKAH → const int
21
CHOL_HAMOED_PESACH → const int
2
CHOL_HAMOED_SUCCOS → const int
16
EREV_PESACH → const int
0
EREV_ROSH_HASHANA → const int
9
EREV_SHAVUOS → const int
4
EREV_SUCCOS → const int
14
EREV_YOM_KIPPUR → const int
12
FAST_OF_ESTHER → const int
24
FAST_OF_GEDALYAH → const int
11
HOSHANA_RABBA → const int
17
parshalist → const List<List<Parsha>>
const [const [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VA…
PESACH → const int
1
PESACH_SHENI → const int
3
PURIM → const int
25
PURIM_KATAN → const int
27
ROSH_CHODESH → const int
28
ROSH_HASHANA → const int
10
SEVENTEEN_OF_TAMMUZ → const int
6
SHAVUOS → const int
5
SHEMINI_ATZERES → const int
18
SHUSHAN_PURIM → const int
26
SIMCHAS_TORAH → const int
19
SUCCOS → const int
15
TENTH_OF_TEVES → const int
22
TISHA_BEAV → const int
7
TU_BEAV → const int
8
TU_BESHVAT → const int
23
YOM_HAATZMAUT → const int
31
YOM_HASHOAH → const int
29
YOM_HAZIKARON → const int
30
YOM_KIPPUR → const int
13
YOM_YERUSHALAYIM → const int
32