public class DateFormatSymbols
extends java.lang.Object
implements java.io.Serializable, java.lang.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 |
---|---|
java.lang.String |
getAmPmString(int i)
Gets ampm strings.
|
java.lang.String[] |
getAmPmStrings()
Gets ampm strings.
|
java.lang.String |
getEra(int i)
Gets era strings.
|
java.lang.String[] |
getEras()
Gets era strings.
|
static DateFormatSymbols |
getInstance()
Gets the
DateFormatSymbols instance in English. |
java.lang.String |
getMonth(int i)
Gets month strings.
|
java.lang.String[] |
getMonths()
Gets month strings.
|
java.lang.String |
getShortMonth(int i)
Gets short month strings.
|
java.lang.String[] |
getShortMonths()
Gets short month strings.
|
java.lang.String |
getShortWeekday(int i)
Gets short weekday strings.
|
java.lang.String[] |
getShortWeekdays()
Gets short weekday strings.
|
java.lang.String |
getWeekday(int i)
Gets weekday strings.
|
java.lang.String[] |
getWeekdays()
Gets weekday strings.
|
void |
setAmPmStrings(java.lang.String[] newAmpms)
Sets ampm strings.
|
void |
setEras(java.lang.String[] newEras)
Sets era strings.
|
void |
setMonths(java.lang.String[] newMonths)
Sets month strings.
|
void |
setShortMonths(java.lang.String[] newShortMonths)
Sets short month strings.
|
void |
setShortWeekdays(java.lang.String[] newShortWeekdays)
Sets short weekday strings.
|
void |
setWeekdays(java.lang.String[] newWeekdays)
Sets weekday strings.
|
public DateFormatSymbols()
getInstance()
public static final DateFormatSymbols getInstance()
DateFormatSymbols
instance in English. .DateFormatSymbols
instance.public java.lang.String[] getEras()
public java.lang.String getEra(int i)
i
- the number of the era.public void setEras(java.lang.String[] newEras)
newEras
- the new era strings.public java.lang.String[] getMonths()
public java.lang.String getMonth(int i)
i
- the number of the month.public void setMonths(java.lang.String[] newMonths)
newMonths
- the new month strings.public java.lang.String[] getShortMonths()
public java.lang.String getShortMonth(int i)
i
- the number of the month.public void setShortMonths(java.lang.String[] newShortMonths)
newShortMonths
- the new short month strings.public java.lang.String[] getWeekdays()
Calendar.SUNDAY
, Calendar.MONDAY
, etc. to index the
result array.public java.lang.String getWeekday(int i)
i
- the number of the weekday.Calendar.SUNDAY
, Calendar.MONDAY
, etc. to index the
result array.public void setWeekdays(java.lang.String[] newWeekdays)
newWeekdays
- the new weekday strings. The array should be indexed by Calendar.SUNDAY
,
Calendar.MONDAY
, etc.public java.lang.String[] getShortWeekdays()
Calendar.SUNDAY
, Calendar.MONDAY
, etc. to index
the result array.public java.lang.String getShortWeekday(int i)
i
- the number of the weekday.Calendar.SUNDAY
, Calendar.MONDAY
, etc. to index
the result array.public void setShortWeekdays(java.lang.String[] newShortWeekdays)
newShortWeekdays
- the new short weekday strings. The array should be indexed by Calendar.SUNDAY
,
Calendar.MONDAY
, etc.public java.lang.String[] getAmPmStrings()
public java.lang.String getAmPmString(int i)
i
- the number of the am/pmpublic void setAmPmStrings(java.lang.String[] newAmpms)
newAmpms
- the new ampm strings.