java.text.DateFormatSymbols
DateFormatSymbols holds the Strings used in the formating and parsing of
dates and times.
Summary
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
public
DateFormatSymbols()
Constructs a new DateFormatSymbols containing the symbols for the default
Locale.
public
DateFormatSymbols(Locale locale)
Constructs a new DateFormatSymbols containing the symbols for the
specified Locale.
Public Methods
public
Object
clone()
Returns a new instance of the same class as the receiver, whose slots
have been filled in with the values in the slots of the receiver.
Classes which wish to support cloning must specify that they implement
the Cloneable interface, since the implementation checks for this.
Returns
- Object a shallow copy of this object.
public
boolean
equals(Object object)
Compares the specified object to this DateFormatSymbols and answer if
they are equal. The object must be an instance of DateFormatSymbols with
the same symbols.
Parameters
object
| the object to compare with this object |
Returns
- true if the specified object is equal to this DateFormatSymbols,
false otherwise
public
String[]
getAmPmStrings()
Returns the array of Strings which represent AM and PM. Use the Calendar
constants Calendar.AM and Calendar.PM to index into the array.
public
String[]
getEras()
Returns the array of Strings which represent BC and AD. Use the Calendar
constants GregorianCalendar.BC and GregorianCalendar.AD to index into the
array.
public
String
getLocalPatternChars()
Returns the pattern characters used by SimpleDateFormat to specify date
and time fields.
Returns
- a String containing the pattern characters
public
String[]
getMonths()
Returns the array of Strings containing the full names of the months. Use
the Calendar constants Calendar.JANUARY, etc. to index into the array.
public
String[]
getShortMonths()
Returns the array of Strings containing the abbreviated names of the
months. Use the Calendar constants Calendar.JANUARY, etc. to index into
the array.
public
String[]
getShortWeekdays()
Returns the array of Strings containing the abbreviated names of the days
of the week. Use the Calendar constants Calendar.SUNDAY, etc. to index
into the array.
public
String[]
getWeekdays()
Returns the array of Strings containing the full names of the days of the
week. Use the Calendar constants Calendar.SUNDAY, etc. to index into the
array.
public
String[][]
getZoneStrings()
Returns the two-dimensional array of Strings containing the names of the
timezones. Each element in the array is an array of five Strings, the
first is a TimeZone ID, and second and third are the full and abbreviated
timezone names for standard time, and the fourth and fifth are the full
and abbreviated names for daylight time.
Returns
- a two-dimensional array of String
public
int
hashCode()
Returns an integer hash code for the receiver. Objects which are equal
answer the same value for this method.
public
void
setAmPmStrings(String[] data)
Sets the array of Strings which represent AM and PM. Use the Calendar
constants Calendar.AM and Calendar.PM to index into the array.
Parameters
data
| the array of Strings
|
public
void
setEras(String[] data)
Sets the array of Strings which represent BC and AD. Use the Calendar
constants GregorianCalendar.BC and GregorianCalendar.AD to index into the
array.
Parameters
data
| the array of Strings
|
public
void
setLocalPatternChars(String data)
Sets the pattern characters used by SimpleDateFormat to specify date and
time fields.
Parameters
data
| the String containing the pattern characters |
public
void
setMonths(String[] data)
Sets the array of Strings containing the full names of the months. Use
the Calendar constants Calendar.JANUARY, etc. to index into the array.
Parameters
data
| the array of Strings
|
public
void
setShortMonths(String[] data)
Sets the array of Strings containing the abbreviated names of the months.
Use the Calendar constants Calendar.JANUARY, etc. to index into the
array.
Parameters
data
| the array of Strings
|
public
void
setShortWeekdays(String[] data)
Sets the array of Strings containing the abbreviated names of the days of
the week. Use the Calendar constants Calendar.SUNDAY, etc. to index into
the array.
Parameters
data
| the array of Strings
|
public
void
setWeekdays(String[] data)
Sets the array of Strings containing the full names of the days of the
week. Use the Calendar constants Calendar.SUNDAY, etc. to index into the
array.
Parameters
data
| the array of Strings
|
public
void
setZoneStrings(String[][] data)
Sets the two-dimensional array of Strings containing the names of the
timezones. Each element in the array is an array of five Strings, the
first is a TimeZone ID, and second and third are the full and abbreviated
timezone names for standard time, and the fourth and fifth are the full
and abbreviated names for daylight time.
Parameters
data
| the two-dimensional array of Strings
|