public enum HebrewMonth extends Enum<HebrewMonth> implements ChronoCondition<HebrewCalendar>
The Hebrew calendar defines 13 Hebrew months.
| Modifier and Type | Class and Description |
|---|---|
static class |
HebrewMonth.Order
Determines which order should be applied on Hebrew months.
|
| Enum Constant and Description |
|---|
ADAR_I
The 6th month of Hebrew calendar with 30 days (leap month).
|
ADAR_II
The 7th month of Hebrew calendar with 29 days.
|
AV
The 12th month of Hebrew calendar with 30 days (11th month in non-leap-years).
|
ELUL
The 13th month of Hebrew calendar with 29 days (12th month in non-leap-years).
|
HESHVAN
The 2nd month of Hebrew calendar with 29 or 30 days.
|
IYAR
The 9th month of Hebrew calendar with 29 days (8th month in non-leap-years).
|
KISLEV
The 3rd month of Hebrew calendar with 29 or 30 days.
|
NISAN
The 8th month of Hebrew calendar with 30 days (7th month in non-leap-years).
|
SHEVAT
The 5th month of Hebrew calendar with 30 days.
|
SIVAN
The 10th month of Hebrew calendar with 30 days (9th month in non-leap-years).
|
TAMUZ
The 11th month of Hebrew calendar with 29 days (10th month in non-leap-years).
|
TEVET
The 4th month of Hebrew calendar with 29 days.
|
TISHRI
The 1st month of Hebrew calendar with 30 days.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBiblicalValue(boolean leapYear)
Gets the corresponding numerical value in biblical order.
|
int |
getCivilValue(boolean leapYear)
Gets the corresponding numerical value in usual civil order.
|
String |
getDisplayName(Locale locale,
boolean leapYear)
Equivalent to the expression
getDisplayName(locale, TextWidth.WIDE, OutputContext.FORMAT, leapYear). |
String |
getDisplayName(Locale locale,
TextWidth width,
OutputContext context,
boolean leapYear)
Gets the description text dependent on the locale and style
parameters.
|
static AttributeKey<HebrewMonth.Order> |
order()
Format attribute which expects months to be numerical with a specific order.
|
boolean |
test(HebrewCalendar context)
Decides if given context matches this condition.
|
static HebrewMonth |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HebrewMonth |
valueOfBiblical(int month,
boolean leapYear)
Gets the enum-constant which corresponds to the given numerical value (in biblical order).
|
static HebrewMonth |
valueOfCivil(int month,
boolean leapYear)
Gets the enum-constant which corresponds to the given numerical value (in standard civil order).
|
static HebrewMonth[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HebrewMonth TISHRI
public static final HebrewMonth HESHVAN
public static final HebrewMonth KISLEV
public static final HebrewMonth TEVET
public static final HebrewMonth SHEVAT
public static final HebrewMonth ADAR_I
Note: This month only occurs in leap years.
public static final HebrewMonth ADAR_II
Note: This month is just called "ADAR" and is effectively the sixth month if it is not in a leap year.
public static final HebrewMonth NISAN
public static final HebrewMonth IYAR
public static final HebrewMonth SIVAN
public static final HebrewMonth TAMUZ
public static final HebrewMonth AV
public static final HebrewMonth ELUL
public static HebrewMonth[] values()
for (HebrewMonth c : HebrewMonth.values()) System.out.println(c);
public static HebrewMonth valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static HebrewMonth valueOfCivil(int month, boolean leapYear)
Gets the enum-constant which corresponds to the given numerical value (in standard civil order).
month - civil number of month in the range [1-13]leapYear - called in a leap year context?IllegalArgumentException - if given argument is out of rangeHebrewMonth.Order.CIVILpublic static HebrewMonth valueOfBiblical(int month, boolean leapYear)
Gets the enum-constant which corresponds to the given numerical value (in biblical order).
month - biblical number of month in the range [1-13]leapYear - called in a leap year context?IllegalArgumentException - if given argument is out of rangeHebrewMonth.Order.BIBLICALpublic int getCivilValue(boolean leapYear)
Gets the corresponding numerical value in usual civil order.
The first month is TISHRI. All months starting with ADAR-II or later decrement the numerical value by 1 if this method is called for a normal year.
leapYear - called in a leap year context?HebrewMonth.Order.CIVILpublic int getBiblicalValue(boolean leapYear)
Gets the corresponding numerical value in biblical order.
The first month in biblical order (Leviticus 23:5) is NISAN. The last month ADAR-II will have the number 12 in normal years and 13 in leap years.
leapYear - called in a leap year context?HebrewMonth.Order.BIBLICALpublic String getDisplayName(Locale locale, boolean leapYear)
Equivalent to the expression
getDisplayName(locale, TextWidth.WIDE, OutputContext.FORMAT, leapYear).
locale - language settingleapYear - called in a leap year context?null)getDisplayName(Locale, TextWidth, OutputContext, boolean)public String getDisplayName(Locale locale, TextWidth width, OutputContext context, boolean leapYear)
Gets the description text dependent on the locale and style parameters.
The second argument controls the width of description while the third argument is only relevant for languages which make a difference between stand-alone forms and embedded text forms (does not matter in English).
locale - language settingwidth - text widthcontext - output contextleapYear - called in a leap year context?null)public boolean test(HebrewCalendar context)
ChronoConditionDecides if given context matches this condition.
Due to better readability it is recommended to use following equivalent approach instead of this method::
import static net.time4j.Weekday.SATURDAY; import static net.time4j.Month.JANUARY; PlainDate date = PlainDate.of(2014, JANUARY, 25); System.out.println(SATURDAY.test(date)); // direct use System.out.println(date.matches(SATURDAY)); // recommended callback
test in interface Predicate<HebrewCalendar>test in interface ChronoCondition<HebrewCalendar>context - context as base of testing this conditiontrue if given time context matches this condition
else falsepublic static AttributeKey<HebrewMonth.Order> order()
Format attribute which expects months to be numerical with a specific order.
Copyright © 2014–2021. All rights reserved.