JewishDate class

Implemented types
Implementers

Constructors

JewishDate()
Default constructor will set a default date to the current system date.
JewishDate.fromDateTime(DateTime dateTime)
A constructor that initializes the date to the {@link java.util.Date Date} paremeter. [...]
JewishDate.fromMolad(double molad)
Constructor that creates a JewishDate based on a molad passed in. The molad would be the number of chalakim/parts starting at the beginning of Sunday prior to the molad Tohu BeHaRaD (Be = Monday, Ha= 5 hours and Rad =204 chalakim/parts) - prior to the start of the Jewish calendar. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080 chalakim after sunset on Sunday evening). [...]
JewishDate.initDate({int jewishYear, int jewishMonth, int jewishDayOfMonth})
Creates a Jewish date based on a Jewish year, month and day of month. [...]

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. [...]
clone() Object
A method that creates a deep copy of the object. [...]
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.
override
equals(Object object) bool
@see Object#equals(Object)#
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. [...]
getAbsDate() int
Returns the absolute date (days since January 1, 0001 on the Gregorian calendar). [...]
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. [...]
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. [...]
getDayOfWeek() int
Returns the day of the week as a number between 1-7. [...]
getDaysInJewishMonth() int
Returns the number of days of the Jewish month that the calendar is currently set to. [...]
getDaysInJewishYear() int
Returns the number of days for the current year that the calendar is set to. [...]
getDaysSinceStartOfJewishYear() int
returns the number of days from Rosh Hashana of the date passed in, to the full date passed in. [...]
getGregorianCalendar() DateTime
Returns this object's date as a {@link java.util.Calendar} object. [...]
getGregorianDayOfMonth() int
Returns the Gregorian day of the month. [...]
getGregorianMonth() int
Returns the Gregorian month (between 0-11). [...]
getGregorianYear() int
Returns the Gregotian year. [...]
getJewishDayOfMonth() int
Returns the Jewish day of month. [...]
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 [...]
getJewishYear() int
Returns the Jewish year. [...]
getLastDayOfGregorianMonth(int month) int
Returns the last day in a gregorian month [...]
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. [...]
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. [...]
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. [...]
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. [...]
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. [...]
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. [...]
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. [...]
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.
setDate(DateTime dateTime) → void
Sets the date based on a {@link java.util.Calendar Calendar} object. Modifies the Jewish date as well. [...]
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. [...]
setGregorianDayOfMonth(int dayOfMonth) → void
sets the Gregorian Day of month. [...]
setGregorianMonth(int month) → void
Sets the Gregorian month. [...]
setGregorianYear(int year) → void
sets the Gregorian year. [...]
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. [...]
setJewishDayOfMonth(int dayOfMonth) → void
sets the Jewish day of month. [...]
setJewishMonth(int month) → void
sets the Jewish month. [...]
setJewishYear(int year) → void
sets the Jewish year. [...]
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. [...]
setMoladHours(int moladHours) → void
Sets the molad hours. [...]
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. [...]
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. [...]
override

Operators

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

Static Methods

getJewishCalendarElapsedDays(int year) int
Returns the number of days elapsed from the Sunday prior to the start of the Jewish calendar to the mean conjunction of Tishri of the Jewish year. [...]

Constants

ADAR → const int
Value of the month field indicating Adar (or Adar I in a {@link #isJewishLeapYear() leap year}), the twelfth numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually be the 6th month of the year.
12
ADAR_II → const int
Value of the month field indicating Adar II, the leap (intercalary or embolismic) thirteenth (Undecimber) numeric month of the year added in Jewish {@link #isJewishLeapYear() leap year}). The leap years are years 3, 6, 8, 11, 14, 17 and 19 of a 19 year cycle. With the year starting at {@link #TISHREI}, it would actually be the 7th month of the year.
13
AV → const int
Value of the month field indicating Av, the fifth numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually be the 11th (or 12th in a {@link #isJewishLeapYear() leap year}) month of the year.
5
CHASERIM → const int
A short year where both {@link #CHESHVAN} and {@link #KISLEV} are 29 days. [...]
0
CHESHVAN → const int
Value of the month field indicating Cheshvan/marcheshvan, the eighth numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually be the 2nd month of the year.
8
ELUL → const int
Value of the month field indicating Elul, the sixth numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually be the 12th (or 13th in a {@link #isJewishLeapYear() leap year}) month of the year.
6
IYAR → const int
Value of the month field indicating Iyar, the second numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually be the 8th (or 9th in a {@link #isJewishLeapYear() leap year}) month of the year.
2
KESIDRAN → const int
An ordered year where {@link #CHESHVAN} is 29 days and {@link #KISLEV} is 30 days. [...]
1
KISLEV → const int
Value of the month field indicating Kislev, the ninth numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually be the 3rd month of the year.
9
NISSAN → const int
Value of the month field indicating Nissan, the first numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually be the 7th (or 8th in a {@link #isJewishLeapYear() leap year}) month of the year.
1
SHELAIMIM → const int
A long year where both {@link #CHESHVAN} and {@link #KISLEV} are 30 days. [...]
2
SHEVAT → const int
Value of the month field indicating Shevat, the eleventh numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually be the 5th month of the year.
11
SIVAN → const int
Value of the month field indicating Sivan, the third numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually be the 9th (or 10th in a {@link #isJewishLeapYear() leap year}) month of the year.
3
TAMMUZ → const int
Value of the month field indicating Tammuz, the fourth numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually be the 10th (or 11th in a {@link #isJewishLeapYear() leap year}) month of the year.
4
TEVES → const int
Value of the month field indicating Teves, the tenth numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually be the 4th month of the year.
10
TISHREI → const int
Value of the month field indicating Tishrei, the seventh numeric month of the year in the Jewish calendar. With the year starting at this month, it would actually be the 1st month of the year.
7