Android
java.text
public class

java.text.DateFormatSymbols

java.lang.Object
java.text.DateFormatSymbols Serializable Cloneable

DateFormatSymbols holds the Strings used in the formating and parsing of dates and times.

Summary

Public Constructors

            DateFormatSymbols()
Constructs a new DateFormatSymbols containing the symbols for the default Locale.
            DateFormatSymbols(Locale locale)
Constructs a new DateFormatSymbols containing the symbols for the specified Locale.

Public Methods

          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.
          boolean  equals(Object object)
Compares the specified object to this DateFormatSymbols and answer if they are equal.
          String[]  getAmPmStrings()
Returns the array of Strings which represent AM and PM.
          String[]  getEras()
Returns the array of Strings which represent BC and AD.
          String  getLocalPatternChars()
Returns the pattern characters used by SimpleDateFormat to specify date and time fields.
          String[]  getMonths()
Returns the array of Strings containing the full names of the months.
          String[]  getShortMonths()
Returns the array of Strings containing the abbreviated names of the months.
          String[]  getShortWeekdays()
Returns the array of Strings containing the abbreviated names of the days of the week.
          String[]  getWeekdays()
Returns the array of Strings containing the full names of the days of the week.
          String[][]  getZoneStrings()
Returns the two-dimensional array of Strings containing the names of the timezones.
          int  hashCode()
Returns an integer hash code for the receiver.
          void  setAmPmStrings(String[] data)
Sets the array of Strings which represent AM and PM.
          void  setEras(String[] data)
Sets the array of Strings which represent BC and AD.
          void  setLocalPatternChars(String data)
Sets the pattern characters used by SimpleDateFormat to specify date and time fields.
          void  setMonths(String[] data)
Sets the array of Strings containing the full names of the months.
          void  setShortMonths(String[] data)
Sets the array of Strings containing the abbreviated names of the months.
          void  setShortWeekdays(String[] data)
Sets the array of Strings containing the abbreviated names of the days of the week.
          void  setWeekdays(String[] data)
Sets the array of Strings containing the full names of the days of the week.
          void  setZoneStrings(String[][] data)
Sets the two-dimensional array of Strings containing the names of the timezones.
Methods inherited from class java.lang.Object

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.

Parameters

locale the 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

See Also

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.

Returns

  • an array of String

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.

Returns

  • an array of String

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.

Returns

  • an array of String

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.

Returns

  • an array of String

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.

Returns

  • an array of String

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.

Returns

  • an array of String

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.

Returns

  • the receiver's hash

See Also

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

Throws

NullPointerException when the data is null

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
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48