Class DateFormatSymbols
- All Implemented Interfaces:
Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddZoneMapping(String zoneId, String longName, String longNameDST, String shortName, String shortNameDST) Adds a timezone mapping so that SimpleDateFormat can recognize abbreviated timezones.clone()String[]String[]getEras()String[]String[]String[]String[]getZoneLongName(String zoneId, String defaultValue) Gets the long name of a given timezone.getZoneLongNameDST(String zoneId, String defaultValue) Gets the long name of a given timezone in daylight saving time.getZoneShortName(String zoneId, String defaultValue) Gets the short name of a given timezone.getZoneShortNameDST(String zoneId, String defaultValue) Gets the short name of a given timezone in daylight saving time.String[][]booleanAllows turning localization on/off defaults to localizationvoidsetAmPmStrings(String[] newAmpms) voidvoidsetLocalized(boolean localized) Allows turning localization on/off defaults to localizationvoidvoidsetResourceBundle(Hashtable<String, String> newResourceBundle) voidsetShortMonths(String[] newShortMonths) voidsetShortWeekdays(String[] newShortWeekdays) voidsetWeekdays(String[] newWeekdays) voidsetZoneStrings(String[][] newZoneStrings)
-
Field Details
-
ZONE_ID
public static final int ZONE_ID- See Also:
-
ZONE_LONGNAME
public static final int ZONE_LONGNAME- See Also:
-
ZONE_SHORTNAME
public static final int ZONE_SHORTNAME- See Also:
-
ZONE_LONGNAME_DST
public static final int ZONE_LONGNAME_DST- See Also:
-
ZONE_SHORTNAME_DST
public static final int ZONE_SHORTNAME_DST- See Also:
-
-
Constructor Details
-
DateFormatSymbols
public DateFormatSymbols()
-
-
Method Details
-
getAmPmStrings
-
setAmPmStrings
-
getResourceBundle
-
setResourceBundle
-
getZoneStrings
-
setZoneStrings
-
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: The TimeZone ID. E.g. America/New_York -
longName: The long name of the mapping. E.g. Eastern Standard Time -
longNameDST: The long name of the mapping in daylight saving time. E.g. Eastern Daylight Time -
shortName: The short name of the mapping. E.g. EST -
shortNameDST: The short name of the mapping in daylight saving time. E.g. EDT
-
-
getZoneShortName
-
getZoneShortNameDST
Gets the short name of a given timezone in daylight saving time.
Parameters
-
zoneId: The timezone ID. E.g. America/Vancouver -
defaultValue: A default value if no mapping is found.
Returns
The short name of the timezone in daylight saving time. E.g. PDT
-
-
getZoneLongName
-
getZoneLongNameDST
Gets the long name of a given timezone in daylight saving time.
Parameters
-
zoneId: The timezone ID. E.g. America/Vancouver -
defaultValue: A default value if no mapping is found.
Returns
The short name of the timezone. E.g. Pacific Daylight Time
-
-
getShortWeekdays
-
setShortWeekdays
-
getWeekdays
-
setWeekdays
-
getShortMonths
-
setShortMonths
-
getMonths
-
setMonths
-
getEras
-
setEras
-
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: the localized to set
-