Package java.text

Class DateFormatSymbols

    • Constructor Detail

      • DateFormatSymbols

        public DateFormatSymbols()
        Construct a DateFormatSymbols.
        See Also:
        getInstance()
    • Method Detail

      • getInstance

        public static final DateFormatSymbols getInstance()
        Gets the DateFormatSymbols instance in English. .
        Returns:
        a DateFormatSymbols instance.
        Since:
        1.6
      • getEras

        public String[] getEras()
        Gets era strings. For example: "AD" and "BC".
        Returns:
        the era strings.
      • getEra

        public String getEra​(int i)
        Gets era strings. For example: "AD" and "BC".
        Parameters:
        i - the number of the era.
        Returns:
        the era strings.
      • setEras

        public void setEras​(String[] newEras)
        Sets era strings. For example: "AD" and "BC".
        Parameters:
        newEras - the new era strings.
      • getMonths

        public String[] getMonths()
        Gets month strings. For example: "January", "February", etc.
        Returns:
        the month strings.
      • getMonth

        public String getMonth​(int i)
        Gets month strings. For example: "January", "February", etc.
        Parameters:
        i - the number of the month.
        Returns:
        the month strings.
      • setMonths

        public void setMonths​(String[] newMonths)
        Sets month strings. For example: "January", "February", etc.
        Parameters:
        newMonths - the new month strings.
      • getShortMonths

        public String[] getShortMonths()
        Gets short month strings. For example: "Jan", "Feb", etc.
        Returns:
        the short month strings.
      • getShortMonth

        public String getShortMonth​(int i)
        Gets short month strings. For example: "Jan", "Feb", etc.
        Parameters:
        i - the number of the month.
        Returns:
        the short month strings.
      • setShortMonths

        public void setShortMonths​(String[] newShortMonths)
        Sets short month strings. For example: "Jan", "Feb", etc.
        Parameters:
        newShortMonths - the new short month strings.
      • getWeekdays

        public String[] getWeekdays()
        Gets weekday strings. For example: "Sunday", "Monday", etc.
        Returns:
        the weekday strings. Use Calendar.SUNDAY, Calendar.MONDAY, etc. to index the result array.
      • getWeekday

        public String getWeekday​(int i)
        Gets weekday strings. For example: "Sunday", "Monday", etc.
        Parameters:
        i - the number of the weekday.
        Returns:
        the weekday strings. Use Calendar.SUNDAY, Calendar.MONDAY, etc. to index the result array.
      • setWeekdays

        public void setWeekdays​(String[] newWeekdays)
        Sets weekday strings. For example: "Sunday", "Monday", etc.
        Parameters:
        newWeekdays - the new weekday strings. The array should be indexed by Calendar.SUNDAY, Calendar.MONDAY, etc.
      • getShortWeekdays

        public String[] getShortWeekdays()
        Gets short weekday strings. For example: "Sun", "Mon", etc.
        Returns:
        the short weekday strings. Use Calendar.SUNDAY, Calendar.MONDAY, etc. to index the result array.
      • getShortWeekday

        public String getShortWeekday​(int i)
        Gets short weekday strings. For example: "Sun", "Mon", etc.
        Parameters:
        i - the number of the weekday.
        Returns:
        the short weekday strings. Use Calendar.SUNDAY, Calendar.MONDAY, etc. to index the result array.
      • setShortWeekdays

        public void setShortWeekdays​(String[] newShortWeekdays)
        Sets short weekday strings. For example: "Sun", "Mon", etc.
        Parameters:
        newShortWeekdays - the new short weekday strings. The array should be indexed by Calendar.SUNDAY, Calendar.MONDAY, etc.
      • getAmPmStrings

        public String[] getAmPmStrings()
        Gets ampm strings. For example: "AM" and "PM".
        Returns:
        the ampm strings.
      • getAmPmString

        public String getAmPmString​(int i)
        Gets ampm strings. For example: "AM" and "PM".
        Parameters:
        i - the number of the am/pm
        Returns:
        the ampm strings.
      • setAmPmStrings

        public void setAmPmStrings​(String[] newAmpms)
        Sets ampm strings. For example: "AM" and "PM".
        Parameters:
        newAmpms - the new ampm strings.