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) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.final ClassgetClass()Returns the runtime class of an object.inthashCode()Returns a hash code value for the object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes current thread to wait until another thread invokes the method or the method for this object.final voidwait(long timeout) Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.final voidwait(long timeout, int nanos) Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
-
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
-