public class DateFormatSymbols

  1. Object
  2. DateFormatSymbols

ImplementsCloneable

Fields

public static final int ZONE_ID = 0
public static final int ZONE_LONGNAME = 1
public static final int ZONE_SHORTNAME = 2
public static final int ZONE_LONGNAME_DST = 3
public static final int ZONE_SHORTNAME_DST = 4

Constructors

public DateFormatSymbols()

Methods

public String[] getAmPmStrings()
public void setAmPmStrings(String[] newAmpms)
public synchronized Hashtable<String, String> getResourceBundle()
public void setResourceBundle(Hashtable<String, String> newResourceBundle)
public String[][] getZoneStrings()
public void setZoneStrings(String[][] newZoneStrings)
public void addZoneMapping(String zoneId, String longName, String longNameDST, String shortName, String shortNameDST)Adds a timezone mapping so that SimpleDateFormat can recognize abbreviated timezones.
public String getZoneShortName(String zoneId, String defaultValue)Gets the short name of a given timezone.
public String getZoneShortNameDST(String zoneId, String defaultValue)Gets the short name of a given timezone in daylight saving time.
public String getZoneLongName(String zoneId, String defaultValue)Gets the long name of a given timezone.
public String getZoneLongNameDST(String zoneId, String defaultValue)Gets the long name of a given timezone in daylight saving time.
public String[] getShortWeekdays()
public void setShortWeekdays(String[] newShortWeekdays)
public String[] getWeekdays()
public void setWeekdays(String[] newWeekdays)
public String[] getShortMonths()
public void setShortMonths(String[] newShortMonths)
public String[] getMonths()
public void setMonths(String[] newMonths)
public String[] getEras()
public void setEras(String[] newEras)
public Object clone()
public boolean isLocalized()Allows turning localization on/off defaults to localization
public void setLocalized(boolean localized)Allows turning localization on/off defaults to localization

Inherited methods

Field details

ZONE_ID

public static final int ZONE_ID = 0

ZONE_LONGNAME

public static final int ZONE_LONGNAME = 1

ZONE_SHORTNAME

public static final int ZONE_SHORTNAME = 2

ZONE_LONGNAME_DST

public static final int ZONE_LONGNAME_DST = 3

ZONE_SHORTNAME_DST

public static final int ZONE_SHORTNAME_DST = 4

Constructor details

DateFormatSymbols

public DateFormatSymbols()

Method details

getAmPmStrings

public String[] getAmPmStrings()

setAmPmStrings

public void setAmPmStrings(String[] newAmpms)

getResourceBundle

public synchronized Hashtable<String, String> getResourceBundle()

setResourceBundle

public void setResourceBundle(Hashtable<String, String> newResourceBundle)

getZoneStrings

public String[][] getZoneStrings()

setZoneStrings

public void setZoneStrings(String[][] newZoneStrings)

addZoneMapping

public void addZoneMapping(String zoneId, String longName, String longNameDST, String shortName, String shortNameDST)
Adds a timezone mapping so that SimpleDateFormat can recognize abbreviated timezones.

Parameters

zoneId String
The TimeZone ID. E.g. America/New_York
longName String
The long name of the mapping. E.g. Eastern Standard Time
longNameDST String
The long name of the mapping in daylight saving time. E.g. Eastern Daylight Time
shortName String
The short name of the mapping. E.g. EST
shortNameDST String
The short name of the mapping in daylight saving time. E.g. EDT

getZoneShortName

public String getZoneShortName(String zoneId, String defaultValue)
Gets the short name of a given timezone.

Parameters

zoneId String
The timezone ID. E.g. America/Vancouver
defaultValue String
A default value if no mapping is found.

Returns

The short name of the timezone. E.g. PST

getZoneShortNameDST

public String getZoneShortNameDST(String zoneId, String defaultValue)
Gets the short name of a given timezone in daylight saving time.

Parameters

zoneId String
The timezone ID. E.g. America/Vancouver
defaultValue String
A default value if no mapping is found.

Returns

The short name of the timezone in daylight saving time. E.g. PDT

getZoneLongName

public String getZoneLongName(String zoneId, String defaultValue)
Gets the long name of a given timezone.

Parameters

zoneId String
The timezone ID. E.g. America/Vancouver
defaultValue String
A default value if no mapping is found.

Returns

The short name of the timezone. E.g. Pacific Standard Time

getZoneLongNameDST

public String getZoneLongNameDST(String zoneId, String defaultValue)
Gets the long name of a given timezone in daylight saving time.

Parameters

zoneId String
The timezone ID. E.g. America/Vancouver
defaultValue String
A default value if no mapping is found.

Returns

The short name of the timezone. E.g. Pacific Daylight Time

getShortWeekdays

public String[] getShortWeekdays()

setShortWeekdays

public void setShortWeekdays(String[] newShortWeekdays)

getWeekdays

public String[] getWeekdays()

setWeekdays

public void setWeekdays(String[] newWeekdays)

getShortMonths

public String[] getShortMonths()

setShortMonths

public void setShortMonths(String[] newShortMonths)

getMonths

public String[] getMonths()

setMonths

public void setMonths(String[] newMonths)

getEras

public String[] getEras()

setEras

public void setEras(String[] newEras)

clone

public Object clone()

isLocalized

public boolean isLocalized()
Allows turning localization on/off defaults to localization

Returns

the localized

setLocalized

public void setLocalized(boolean localized)
Allows turning localization on/off defaults to localization

Parameters

localized boolean
the localized to set