public class DateFormatSymbols extends Object implements Serializable, Cloneable
DateFormatSymbols
is a public class for encapsulating localizable date-time formatting data, such as the
names of the months, the names of the days of the week, and the time zone data. DateFormat
and
SimpleDateFormat
both use DateFormatSymbols
to encapsulate this information.
DateFormat
,
SimpleDateFormat
,
Serialized FormConstructor and Description |
---|
DateFormatSymbols()
Construct a DateFormatSymbols.
|
Modifier and Type | Method and Description |
---|---|
String |
getAmPmString(int i)
Gets ampm strings.
|
String[] |
getAmPmStrings()
Gets ampm strings.
|
String |
getEra(int i)
Gets era strings.
|
String[] |
getEras()
Gets era strings.
|
static DateFormatSymbols |
getInstance()
Gets the
DateFormatSymbols instance in English. |
String |
getMonth(int i)
Gets month strings.
|
String[] |
getMonths()
Gets month strings.
|
String |
getShortMonth(int i)
Gets short month strings.
|
String[] |
getShortMonths()
Gets short month strings.
|
String |
getShortWeekday(int i)
Gets short weekday strings.
|
String[] |
getShortWeekdays()
Gets short weekday strings.
|
String |
getWeekday(int i)
Gets weekday strings.
|
String[] |
getWeekdays()
Gets weekday strings.
|
void |
setAmPmStrings(String[] newAmpms)
Sets ampm strings.
|
void |
setEras(String[] newEras)
Sets era strings.
|
void |
setMonths(String[] newMonths)
Sets month strings.
|
void |
setShortMonths(String[] newShortMonths)
Sets short month strings.
|
void |
setShortWeekdays(String[] newShortWeekdays)
Sets short weekday strings.
|
void |
setWeekdays(String[] newWeekdays)
Sets weekday strings.
|
public DateFormatSymbols()
getInstance()
public String getAmPmString(int i)
i
- the number of the am/pmpublic String[] getAmPmStrings()
public String getEra(int i)
i
- the number of the era.public String[] getEras()
public static final DateFormatSymbols getInstance()
DateFormatSymbols
instance in English. .DateFormatSymbols
instance.public String getMonth(int i)
i
- the number of the month.public String[] getMonths()
public String getShortMonth(int i)
i
- the number of the month.public String[] getShortMonths()
public String getShortWeekday(int i)
i
- the number of the weekday.Calendar.SUNDAY
, Calendar.MONDAY
, etc. to index
the result array.public String[] getShortWeekdays()
Calendar.SUNDAY
, Calendar.MONDAY
, etc. to index
the result array.public String getWeekday(int i)
i
- the number of the weekday.Calendar.SUNDAY
, Calendar.MONDAY
, etc. to index the
result array.public String[] getWeekdays()
Calendar.SUNDAY
, Calendar.MONDAY
, etc. to index the
result array.public void setAmPmStrings(String[] newAmpms)
newAmpms
- the new ampm strings.public void setEras(String[] newEras)
newEras
- the new era strings.public void setMonths(String[] newMonths)
newMonths
- the new month strings.public void setShortMonths(String[] newShortMonths)
newShortMonths
- the new short month strings.public void setShortWeekdays(String[] newShortWeekdays)
newShortWeekdays
- the new short weekday strings. The array should be indexed by Calendar.SUNDAY
,
Calendar.MONDAY
, etc.public void setWeekdays(String[] newWeekdays)
newWeekdays
- the new weekday strings. The array should be indexed by Calendar.SUNDAY
,
Calendar.MONDAY
, etc.