java.text.DateFormatSymbols
java.lang.Object
None
java.lang.Cloneable, java.io.Serializable
New as of JDK 1.1
The DateFormatSymbols class encapsulates date and time formatting data that is locale-specific, like the names of the days of the week and the names of the months. Typically, you do not need to instantiate DateFormatSymbols yourself. Instead, an instance is automatically created for you, behind the scenes, when you use one of the factory methods in DateFormat to create a DateFormat object. You can retrieve a DateFormatSymbols object by calling the getDateFormatSymbols() method of SimpleDateFormat. Once you have a DateFormatSymbols object, you can modify the strings it uses if you want to change them.
public class java.text.DateFormatSymbols extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable { // Constructors public DateFormatSymbols(); public DateFormatSymbols(Locale locale); // Instance Methods public Object clone(); public boolean equals(Object obj); public String[] getAmPmStrings(); public String[] getEras(); public String getLocalPatternChars(); public String[] getMonths(); public String[] getShortMonths(); public String[] getShortWeekdays(); public String[] getWeekdays(); public String[][] getZoneStrings(); public int hashCode(); public void setAmPmStrings(String[] newAmpms); public void setEras(String[] newEras); public void setLocalPatternChars(String newLocalPatternChars); public void setMonths(String[] newMonths); public void setShortMonths(String[] newShortMonths); public void setShortWeekdays(String[] newShortWeekdays); public void setWeekdays(String[] newWeekdays); public void setZoneStrings(String[][] newZoneStrings); }
If the resources for the default locale cannot be found or loaded.
This constructor creates a DateFormatSymbols object for the default locale.
The Locale to use.
If the resources for the given locale cannot be found or loaded.
This constructor creates a DateFormatSymbols object for the given locale.
A copy of this DateFormatSymbols.
Object.clone()
This method creates a copy of this DateFormatSymbols and returns it.
The object to be compared with this object.
true if the objects are equal; false if they are not.
Object.equals()
This method returns true if obj is an instance of DecimalFormatSymbols and is equivalent to this DateFormatSymbols.
An array of strings used for the A.M./P.M. field for this DateFormatSymbols.
This method returns the strings that are used for the A.M./P.M. field (e.g., "AM", "PM").
An array of strings used for the era field for this DateFormatSymbols.
This method returns the strings that are used for the era field (e.g., "BC", "AD").
A string that contains the data-time pattern characters for this DateFormatSymbols.
This method returns the data-time pattern characters for the locale of this object.
An array of strings used for the month field for this DateFormatSymbols.
This method returns the strings that are used for the month field (e.g., "January", "February").
An array of strings used for the short month field for this DateFormatSymbols.
This method returns the strings that are used for the short (i.e., three-character) month field (e.g., "Jan", "Feb").
An array ofstrings used for the short weekday field for this DateFormatSymbols.
This method returns the strings that are used for the short (i.e., three-character) weekday field (e.g., "Mon", "Tue").
An array ofstrings used for the weekday field for this DateFormatSymbols.
This method returns the strings that are used for the weekday field (e.g., "Monday", "Tuesday").
An array of arrays of strings used for the time zones for this DateFormatSymbols.
This method returns the time-zone strings. Each subarray is an array of six strings that specify a time-zone ID, its long name, its short name, its daylight-savings-time name, its short daylight-savings-time name, and a major city in the time zone. For example, an entry for Mountain Standard Time is:
{"MST", "Mountain Standard Time", "MST", "Mountain Daylight Time", "MDT", "Denver"}
A hashcode for this object.
Object.hashCode()
This method returns a hashcode for this DateFormatSymbols object.
The new strings.
This method sets the strings that are used for the A.M./P.M. field for this DateFormatSymbols.
The new strings.
This method sets the strings that are used for the era field for this DateFormatSymbols.
The new date-time pattern characters.
This method sets the date-time pattern characters of this DateFormatSymbols object.
The new strings.
This method sets the strings that are used for the month field for this DateFormatSymbols.
The new strings.
This method sets the strings that are used for the short (i.e., three-character) month field for this DateFormatSymbols.
The new strings.
This method sets the strings that are used for the short (i.e., three-character) weekday field for this DateFormatSymbols.
The new strings.
This method sets the strings that are used for the weekday field for this DateFormatSymbols.
The new strings.
This method sets the strings that are used for the time-zone field for this DateFormatSymbols.
Method | Inherited From | Method | Inherited From |
---|---|---|---|
finalize() |
Object |
getClass() |
Object |
notify() |
Object |
notifyAll() |
Object |
toString() |
Object |
wait() |
Object |
wait(long) |
Object |
wait(long, int) |
Object |
Calendar, DateFormat, Locale, SimpleDateFormat, TimeZone
This HTML Help has been published using the chm2web software. |