public enum DayOfWeekPersian extends Enum<DayOfWeekPersian>
This enum contains all days-of-week in both persian and english, this class mainly used in JalaliDate.
Notice: Yekshanbe has got the numberic value of 1 and shanbe has got 7, so beginning of the week is yekshanbe
JalaliDate| Enum Constant and Description |
|---|
Chaharshanbeh
The singleton instance for the day of Chaharshanbeh
This has the numeric value of
4. |
Doshanbeh
The singleton instance for the day of Doshanbeh
This has the numeric value of
2. |
Jomeh
The singleton instance for the day of Jomeh
This has the numeric value of
6. |
Panjshanbeh
The singleton instance for the day of Panjshanbeh
This has the numeric value of
5. |
Seshhanbeh
The singleton instance for the day of Seshhanbeh
This has the numeric value of
3. |
Shanbeh
The singleton instance for the day of Shanbeh
This has the numeric value of
7. |
Yekshanbeh
The singleton instance for the day of Yekshanbeh
This has the numeric value of
1. |
| Modifier and Type | Method and Description |
|---|---|
static DayOfWeekPersian |
getEnum(int value) |
String |
getStringInEnglish() |
String |
getStringInPersian() |
int |
getValue()
Gets the days-of-week
int value. |
static DayOfWeekPersian |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DayOfWeekPersian[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DayOfWeekPersian Yekshanbeh
1.public static final DayOfWeekPersian Doshanbeh
2.public static final DayOfWeekPersian Seshhanbeh
3.public static final DayOfWeekPersian Chaharshanbeh
4.public static final DayOfWeekPersian Panjshanbeh
5.public static final DayOfWeekPersian Jomeh
6.public static final DayOfWeekPersian Shanbeh
7.public static DayOfWeekPersian[] values()
for (DayOfWeekPersian c : DayOfWeekPersian.values()) System.out.println(c);
public static DayOfWeekPersian 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 int getValue()
int value.
The values are numbered following the ISO-8601 standard, from 1 (Yekshanbeh) to 7 (Shanbe).
public static DayOfWeekPersian getEnum(int value)
public String getStringInPersian()
public String getStringInEnglish()
Copyright © 2018. All rights reserved.