IT. Expert System.

Android Reference

DateFormatSymbols


java.text

Class DateFormatSymbols

  • All Implemented Interfaces:
    Serializable, Cloneable


    public class DateFormatSymbols
    extends Object
    implements Serializable, Cloneable
    Encapsulates localized date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data. DateFormat and SimpleDateFormat both use DateFormatSymbols to encapsulate this information.

    Typically you shouldn't use DateFormatSymbols directly. Rather, you are encouraged to create a date/time formatter with the DateFormat class's factory methods: getTimeInstance, getDateInstance, or getDateTimeInstance. These methods automatically create a DateFormatSymbols for the formatter so that you don't have to. After the formatter is created, you may modify its format pattern using the setPattern method. For more information about creating formatters using DateFormat's factory methods, see DateFormat.

    Direct use of DateFormatSymbols is likely to be less efficient because the implementation cannot make assumptions about user-supplied/user-modifiable data to the same extent that it can with its own built-in data.

    See Also:
    DateFormat, SimpleDateFormat, Serialized Form
    • Constructor Detail

      • DateFormatSymbols

        public DateFormatSymbols()
        Constructs a new DateFormatSymbols instance containing the symbols for the user's default locale. See "Be wary of the default locale".
      • DateFormatSymbols

        public DateFormatSymbols(Locale locale)
        Constructs a new DateFormatSymbols instance containing the symbols for the specified locale.
        Parameters:
        locale - the locale.
    • Method Detail

      • getInstance

        public static final DateFormatSymbols getInstance(Locale locale)
        Returns a new DateFormatSymbols for the given locale.
        Parameters:
        locale - the locale
        Returns:
        an instance of DateFormatSymbols
        Throws:
        NullPointerException - if locale == null
        Since:
        1.6
      • getAvailableLocales

        public static Locale[] getAvailableLocales()
        Returns an array of locales for which custom DateFormatSymbols instances are available.

        Note that Android does not support user-supplied locale service providers.

        Since:
        1.6
      • clone

        public Object clone()
        Description copied from class: Object
        Creates and returns a copy of this Object. The default implementation returns a so-called "shallow" copy: It creates a new instance of the same class and then copies the field values (including object references) from this instance to the new instance. A "deep" copy, in contrast, would also recursively clone nested objects. A subclass that needs to implement this kind of cloning should call super.clone() to create the new instance and then create deep copies of the nested, mutable objects.
        Overrides:
        clone in class Object
        Returns:
        a copy of this object.
      • equals

        public boolean equals(Object object)
        Compares this object with the specified object and indicates if they are equal.
        Overrides:
        equals in class Object
        Parameters:
        object - the object to compare with this object.
        Returns:
        true if object is an instance of DateFormatSymbols and has the same symbols as this object, false otherwise.
        See Also:
        hashCode()
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.
      • getAmPmStrings

        public String[] getAmPmStrings()
        Returns the array of strings which represent AM and PM. Use the Calendar constants Calendar.AM and Calendar.PM as indices for the array.
        Returns:
        an array of strings.
      • getEras

        public String[] getEras()
        Returns the array of strings which represent BC and AD. Use the Calendar constants GregorianCalendar.BC and GregorianCalendar.AD as indices for the array.
        Returns:
        an array of strings.
      • getLocalPatternChars

        public String getLocalPatternChars()
        Returns the pattern characters used by SimpleDateFormat to specify date and time fields.
        Returns:
        a string containing the pattern characters.
      • getMonths

        public String[] getMonths()
        Returns the array of strings containing the full names of the months. Use the Calendar constants Calendar.JANUARY etc. as indices for the array.
        Returns:
        an array of strings.
      • getShortMonths

        public String[] getShortMonths()
        Returns the array of strings containing the abbreviated names of the months. Use the Calendar constants Calendar.JANUARY etc. as indices for the array.
        Returns:
        an array of strings.
      • getShortWeekdays

        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. as indices for the array.
        Returns:
        an array of strings.
      • getWeekdays

        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. as indices for the array.
        Returns:
        an array of strings.
      • getZoneStrings

        public String[][] getZoneStrings()
        Returns the two-dimensional array of strings containing localized names for time zones. Each row is an array of five strings:
        • The time zone ID, for example "America/Los_Angeles". This is not localized, and is used as a key into the table.
        • The long display name, for example "Pacific Standard Time".
        • The short display name, for example "PST".
        • The long display name for DST, for example "Pacific Daylight Time". This is the non-DST long name for zones that have never had DST, for example "Central Standard Time" for "Canada/Saskatchewan".
        • The short display name for DST, for example "PDT". This is the non-DST short name for zones that have never had DST, for example "CST" for "Canada/Saskatchewan".
      • hashCode

        public int hashCode()
        Description copied from class: Object
        Returns an integer hash code for this object. By contract, any two objects for which Object.equals(java.lang.Object) returns true must return the same hash code value. This means that subclasses of Object usually override both methods or neither method.

        Note that hash values must not change over time unless information used in equals comparisons also changes.

        See Writing a correct hashCode method if you intend implementing your own hashCode method.

        Overrides:
        hashCode in class Object
        Returns:
        this object's hash code.
        See Also:
        Object.equals(java.lang.Object)
      • setAmPmStrings

        public void setAmPmStrings(String[] data)
        Sets the array of strings which represent AM and PM. Use the Calendar constants Calendar.AM and Calendar.PM as indices for the array.
        Parameters:
        data - the array of strings for AM and PM.
      • setEras

        public void setEras(String[] data)
        Sets the array of Strings which represent BC and AD. Use the Calendar constants GregorianCalendar.BC and GregorianCalendar.AD as indices for the array.
        Parameters:
        data - the array of strings for BC and AD.
      • setLocalPatternChars

        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 - if data is null
      • setMonths

        public void setMonths(String[] data)
        Sets the array of strings containing the full names of the months. Use the Calendar constants Calendar.JANUARY etc. as indices for the array.
        Parameters:
        data - the array of strings.
      • setShortMonths

        public void setShortMonths(String[] data)
        Sets the array of strings containing the abbreviated names of the months. Use the Calendar constants Calendar.JANUARY etc. as indices for the array.
        Parameters:
        data - the array of strings.
      • setShortWeekdays

        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. as indices for the array.
        Parameters:
        data - the array of strings.
      • setWeekdays

        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. as indices for the array.
        Parameters:
        data - the array of strings.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 139 / 158856737. Delta: 0.04127 с