public class DateFormatSymbols
- Object
- DateFormatSymbols
ImplementsCloneable
Fields
Constructors
public DateFormatSymbols() |
Methods
Inherited methods
Field details
ZONE_ID
public static final int ZONE_ID = 0ZONE_LONGNAME
public static final int ZONE_LONGNAME = 1ZONE_SHORTNAME
public static final int ZONE_SHORTNAME = 2ZONE_LONGNAME_DST
public static final int ZONE_LONGNAME_DST = 3ZONE_SHORTNAME_DST
public static final int ZONE_SHORTNAME_DST = 4Constructor 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
zoneIdString- The TimeZone ID. E.g. America/New_York
longNameString- The long name of the mapping. E.g. Eastern Standard Time
longNameDSTString- The long name of the mapping in daylight saving time. E.g. Eastern Daylight Time
shortNameString- The short name of the mapping. E.g. EST
shortNameDSTString- 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
zoneIdString- The timezone ID. E.g. America/Vancouver
defaultValueString- 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
zoneIdString- The timezone ID. E.g. America/Vancouver
defaultValueString- 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
zoneIdString- The timezone ID. E.g. America/Vancouver
defaultValueString- 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
zoneIdString- The timezone ID. E.g. America/Vancouver
defaultValueString- 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
localizedboolean- the localized to set