Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.text

Class DateFormatSymbols

java.lang.Object
|
+--java.text.DateFormatSymbols

All Implemented Interfaces:

Serializable, Cloneable


public class DateFormatSymbols

extends Object

implements Serializable, Cloneable

This class acts as container for locale specific date/time formatting information such as the days of the week and the months of the year.

Author:

Constructor Summary

DateFormatSymbols(java.util.Locale locale)

This method initializes a new instance of DateFormatSymbols by loading the date format information for the specified locale.
DateFormatSymbols()

This method loads the format symbol information for the default locale.

Method Summary

java.lang.Objectclone()

Returns a new copy of this object.
booleanequals(java.lang.Object obj)

This method tests a specified object for equality against this object.
java.lang.String[]getAmPmStrings()

This method returns the list of strings used for displaying AM or PM.
java.lang.String[]getEras()

This method returns the list of strings used for displaying eras (e.g., "BC" and "AD").
java.lang.StringgetLocalPatternChars()

This method returns the pattern character information for this object.
java.lang.String[]getMonths()

This method returns the list of strings used for displaying month names (e.g., "January" and "February").
java.lang.String[]getShortMonths()

This method returns the list of strings used for displaying abbreviated month names (e.g., "Jan" and "Feb").
java.lang.String[]getShortWeekdays()

This method returns the list of strings used for displaying abbreviated weekday names (e.g., "Sun" and "Mon").
java.lang.String[]getWeekdays()

This method returns the list of strings used for displaying weekday names (e.g., "Sunday" and "Monday").
java.lang.String[][]getZoneStrings()

This method returns this list of localized timezone display strings.
inthashCode()

This method returns a hash value for this object.
voidsetAmPmStrings(java.lang.String[] value)

This method sets the list of strings used to display AM/PM values to the specified list.
voidsetEras(java.lang.String[] value)

This method sets the list of strings used to display time eras to to the specified list.
voidsetLocalPatternChars(java.lang.String value)

This method sets the list of characters used to specific date/time formatting strings.
voidsetMonths(java.lang.String[] value)

This method sets the list of strings used to display month names.
voidsetShortMonths(java.lang.String[] value)

This method sets the list of strings used to display abbreviated month names.
voidsetShortWeekdays(java.lang.String[] value)

This method sets the list of strings used to display abbreviated weekday names.
voidsetWeekdays(java.lang.String[] value)

This method sets the list of strings used to display weekday names.
voidsetZoneStrings(java.lang.String[][] value)

This method sets the list of display strings for time zones.

Constructor Details

DateFormatSymbols

public DateFormatSymbols()

This method loads the format symbol information for the default locale.


DateFormatSymbols

public DateFormatSymbols(java.util.Locale locale)

This method initializes a new instance of DateFormatSymbols by loading the date format information for the specified locale.

Parameters:


Method Details

clone

public Object clone()

Returns a new copy of this object.


equals

public boolean equals(java.lang.Object obj)

This method tests a specified object for equality against this object. This will be true if and only if the specified object:

Parameters:

Returns:


getAmPmStrings

public String[] getAmPmStrings()

This method returns the list of strings used for displaying AM or PM. This is a two element String array indexed by Calendar.AM and Calendar.PM

Returns:


getEras

public String[] getEras()

This method returns the list of strings used for displaying eras (e.g., "BC" and "AD"). This is a two element String array indexed by Calendar.BC and Calendar.AD.

Returns:


getLocalPatternChars

public String getLocalPatternChars()

This method returns the pattern character information for this object. This is an 18 character string that contains the characters that are used in creating the date formatting strings in SimpleDateFormat. The following are the character positions in the string and which format character they correspond to (the character in parentheses is the default value in the US English locale):

Returns:


getMonths

public String[] getMonths()

This method returns the list of strings used for displaying month names (e.g., "January" and "February"). This is a thirteen element string array indexed by Calendar.JANUARY through Calendar.UNDECEMBER. Note that there are thirteen elements because some calendars have thriteen months.

Returns:


getShortMonths

public String[] getShortMonths()

This method returns the list of strings used for displaying abbreviated month names (e.g., "Jan" and "Feb"). This is a thirteen element String array indexed by Calendar.JANUARY through Calendar.UNDECEMBER. Note that there are thirteen elements because some calendars have thirteen months.

Returns:


getShortWeekdays

public String[] getShortWeekdays()

This method returns the list of strings used for displaying abbreviated weekday names (e.g., "Sun" and "Mon"). This is an eight element String array indexed by Calendar.SUNDAY through Calendar.SATURDAY. Note that the first element of this array is ignored.

Returns:


getWeekdays

public String[] getWeekdays()

This method returns the list of strings used for displaying weekday names (e.g., "Sunday" and "Monday"). This is an eight element String array indexed by Calendar.SUNDAY through Calendar.SATURDAY. Note that the first element of this array is ignored.

Returns:


getZoneStrings

public String[][] getZoneStrings()

This method returns this list of localized timezone display strings. This is a two dimensional String array where each row in the array contains five values:

Returns:


hashCode

public int hashCode()

This method returns a hash value for this object.

Returns:


setAmPmStrings

public void setAmPmStrings(java.lang.String[] value)

This method sets the list of strings used to display AM/PM values to the specified list. This is a two element String array indexed by Calendar.AM and Calendar.PM

Parameters:


setEras

public void setEras(java.lang.String[] value)

This method sets the list of strings used to display time eras to to the specified list. This is a two element String array indexed by Calendar.BC and Calendar.AD.

Parameters:


setLocalPatternChars

public void setLocalPatternChars(java.lang.String value)

This method sets the list of characters used to specific date/time formatting strings. This is an 18 character string that contains the characters that are used in creating the date formatting strings in SimpleDateFormat. The following are the character positions in the string and which format character they correspond to (the character in parentheses is the default value in the US English locale):

Parameters:


setMonths

public void setMonths(java.lang.String[] value)

This method sets the list of strings used to display month names. This is a thirteen element string array indexed by Calendar.JANUARY through Calendar.UNDECEMBER. Note that there are thirteen elements because some calendars have thriteen months.

Parameters:


setShortMonths

public void setShortMonths(java.lang.String[] value)

This method sets the list of strings used to display abbreviated month names. This is a thirteen element String array indexed by Calendar.JANUARY through Calendar.UNDECEMBER. Note that there are thirteen elements because some calendars have thirteen months.

Parameters:


setShortWeekdays

public void setShortWeekdays(java.lang.String[] value)

This method sets the list of strings used to display abbreviated weekday names. This is an eight element String array indexed by Calendar.SUNDAY through Calendar.SATURDAY. Note that the first element of this array is ignored.

Parameters:


setWeekdays

public void setWeekdays(java.lang.String[] value)

This method sets the list of strings used to display weekday names. This is an eight element String array indexed by Calendar.SUNDAY through Calendar.SATURDAY. Note that the first element of this array is ignored.

Parameters:


setZoneStrings

public void setZoneStrings(java.lang.String[][] value)

This method sets the list of display strings for time zones. This is a two dimensional String array where each row in the array contains five values:

Parameters:

Returns: