public class HebrewCalendar extends Calendar
HebrewCalendar
is a subclass of Calendar
that that implements the traditional Hebrew calendar.
This is the civil calendar in Israel and the liturgical calendar
of the Jewish faith worldwide.
The Hebrew calendar is lunisolar and thus has a number of interesting properties that distinguish it from the Gregorian. Months start on the day of (an arithmetic approximation of) each new moon. Since the solar year (approximately 365.24 days) is not an even multiple of the lunar month (approximately 29.53 days) an extra "leap month" is inserted in 7 out of every 19 years. To make matters even more interesting, the start of a year can be delayed by up to three days in order to prevent certain holidays from falling on the Sabbath and to prevent certain illegal year lengths. Finally, the lengths of certain months can vary depending on the number of days in the year.
The leap month is known as "Adar 1" and is inserted between the
months of Shevat and Adar in leap years. Since the leap month does
not come at the end of the year, calculations involving
month numbers are particularly complex. Users of this class should
make sure to use the roll
and add
methods
rather than attempting to perform date arithmetic by manipulating
the fields directly.
Note: In the traditional Hebrew calendar, days start at sunset. However, in order to keep the time fields in this class synchronized with those of the other calendars and with local clock time, we treat days and months as beginning at midnight, roughly 6 hours after the corresponding sunset.
If you are interested in more information on the rules behind the Hebrew calendar, see one of the following references:
This class should not be subclassed.
HebrewCalendar usually should be instantiated using
Calendar.getInstance(ULocale)
passing in a ULocale
with the tag "@calendar=hebrew"
.
GregorianCalendar
,
Calendar
,
Serialized FormCalendar.FormatConfiguration, Calendar.WeekData
Modifier and Type | Field and Description |
---|---|
static int |
ADAR
Constant for the Adar, the 7th month of the Hebrew year.
|
static int |
ADAR_1
Constant for Adar I, the 6th month of the Hebrew year
(present in leap years only).
|
static int |
AV
Constant for Av, the 12th month of the Hebrew year.
|
static int |
ELUL
Constant for Elul, the 13th month of the Hebrew year.
|
static int |
HESHVAN
Constant for Heshvan, the 2nd month of the Hebrew year.
|
static int |
IYAR
Constant for Iyar, the 9th month of the Hebrew year.
|
static int |
KISLEV
Constant for Kislev, the 3rd month of the Hebrew year.
|
static int |
NISAN
Constant for Nisan, the 8th month of the Hebrew year.
|
static int |
SHEVAT
Constant for Shevat, the 5th month of the Hebrew year.
|
static int |
SIVAN
Constant for Sivan, the 10th month of the Hebrew year.
|
static int |
TAMUZ
Constant for Tammuz, the 11th month of the Hebrew year.
|
static int |
TEVET
Constant for Tevet, the 4th month of the Hebrew year.
|
static int |
TISHRI
Constant for Tishri, the 1st month of the Hebrew year.
|
AM, AM_PM, APRIL, AUGUST, BASE_FIELD_COUNT, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR,