public enum PersianMonth extends Enum<PersianMonth> implements ChronoCondition<PersianCalendar>
The Persian calendar defines 12 persian months.
| Enum Constant and Description |
|---|
ABAN
The 8th month of Persian Calendar with 30 days.
|
AZAR
The 9th month of Persian Calendar with 30 days.
|
BAHMAN
The 11th month of Persian Calendar with 30 days.
|
DEY
The 10th month of Persian Calendar with 30 days.
|
ESFAND
The 12th month of Persian Calendar with 29 or 30 days (if in leap year).
|
FARVARDIN
The 1st month of Persian Calendar with 31 days.
|
KHORDAD
The 3rd month of Persian Calendar with 31 days.
|
MEHR
The 7th month of Persian Calendar with 30 days.
|
MORDAD
The 5th month of Persian Calendar with 31 days.
|
ORDIBEHESHT
The 2nd month of Persian Calendar with 31 days.
|
SHAHRIVAR
The 6th month of Persian Calendar with 31 days.
|
TIR
The 4th month of Persian Calendar with 31 days.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDisplayName(Locale locale)
Equivalent to the expression
getDisplayName(locale, TextWidth.WIDE, OutputContext.FORMAT). |
String |
getDisplayName(Locale locale,
TextWidth width,
OutputContext context)
Gets the description text dependent on the locale and style
parameters.
|
int |
getValue()
Gets the corresponding numerical value.
|
boolean |
test(PersianCalendar context)
Decides if given context matches this condition.
|
static PersianMonth |
valueOf(int month)
Gets the enum-constant which corresponds to the given numerical value.
|
static PersianMonth |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PersianMonth[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PersianMonth FARVARDIN
public static final PersianMonth ORDIBEHESHT
public static final PersianMonth KHORDAD
public static final PersianMonth TIR
public static final PersianMonth MORDAD
public static final PersianMonth SHAHRIVAR
public static final PersianMonth MEHR
public static final PersianMonth ABAN
public static final PersianMonth AZAR
public static final PersianMonth DEY
public static final PersianMonth BAHMAN
public static final PersianMonth ESFAND
public static PersianMonth[] values()
for (PersianMonth c : PersianMonth.values()) System.out.println(c);
public static PersianMonth 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 PersianMonth valueOf(int month)
Gets the enum-constant which corresponds to the given numerical value.
month - persian month in the range [1-12]IllegalArgumentException - if given argument is out of rangepublic int getValue()
Gets the corresponding numerical value.
public String getDisplayName(Locale locale)
Equivalent to the expression
getDisplayName(locale, TextWidth.WIDE, OutputContext.FORMAT).
locale - language settingnull)getDisplayName(Locale, TextWidth, OutputContext)public String getDisplayName(Locale locale, TextWidth width, OutputContext context)
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 contextnull)public boolean test(PersianCalendar 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<PersianCalendar>test in interface ChronoCondition<PersianCalendar>context - context as base of testing this conditiontrue if given time context matches this condition
else falseCopyright © 2014–2021. All rights reserved.