All Implemented Interfaces:
Serializable, Cloneable

  • Nested Class Summary

    Nested classes/interfaces declared in class DateFormat

    DateFormat.Field

    static class 

    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from DateFormat.formatToCharacterIterator and as field identifiers in FieldPosition.

  • Field Summary

    Fields declared in class DateFormat

    AM_PM_FIELD, calendar, DATE_FIELD, DAY_OF_WEEK_FIELD, DAY_OF_WEEK_IN_MONTH_FIELD, DAY_OF_YEAR_FIELD, DEFAULT, ERA_FIELD, FULL, HOUR_OF_DAY0_FIELD, HOUR_OF_DAY1_FIELD, HOUR0_FIELD, HOUR1_FIELD, LONG, MEDIUM, MILLISECOND_FIELD, MINUTE_FIELD, MONTH_FIELD, numberFormat, SECOND_FIELD, SHORT, TIMEZONE_FIELD, WEEK_OF_MONTH_FIELD, WEEK_OF_YEAR_FIELD, YEAR_FIELD

    static final int

    Useful constant for AM_PM field alignment.

    The Calendar instance used for calculating the date-time fields and the instant of time.

    static final int

    Useful constant for DATE field alignment.

    static final int

    Useful constant for DAY_OF_WEEK field alignment.

    static final int

    Useful constant for DAY_OF_WEEK_IN_MONTH field alignment.

    static final int

    Useful constant for DAY_OF_YEAR field alignment.

    static final int

    Constant for default style pattern.

    static final int

    Useful constant for ERA field alignment.

    static final int

    Constant for full style pattern.

    static final int

    Useful constant for zero-based HOUR_OF_DAY field alignment.

    static final int

    Useful constant for one-based HOUR_OF_DAY field alignment.

    static final int

    Useful constant for zero-based HOUR field alignment.

    static final int

    Useful constant for one-based HOUR field alignment.

    static final int

    Constant for long style pattern.

    static final int

    Constant for medium style pattern.

    static final int

    Useful constant for MILLISECOND field alignment.

    static final int

    Useful constant for MINUTE field alignment.

    static final int

    Useful constant for MONTH field alignment.

    The number formatter that DateFormat uses to format numbers in dates and times.

    static final int

    Useful constant for SECOND field alignment.

    static final int

    Constant for short style pattern.

    static final int

    Useful constant for TIMEZONE field alignment.

    static final int

    Useful constant for WEEK_OF_MONTH field alignment.

    static final int

    Useful constant for WEEK_OF_YEAR field alignment.

    static final int

    Useful constant for YEAR field alignment.

  • Constructor Summary

    Constructors

    Constructs a SimpleDateFormat using the default pattern and date format symbols for the default FORMAT locale.

    Constructs a SimpleDateFormat using the given pattern and the default date format symbols for the default FORMAT locale.

    Constructs a SimpleDateFormat using the given pattern and date format symbols.

    Constructs a SimpleDateFormat using the given pattern and the default date format symbols for the given locale.

  • Method Summary

    void

    Applies the given localized pattern string to this date format.

    void

    Applies the given pattern string to this date format.

    clone()

    Creates a copy of this SimpleDateFormat.

    boolean

    Compares the specified object with this SimpleDateFormat for equality.

    Formats the given Date into a date/time string and appends the result to the given StringBuffer.

    Formats an Object producing an AttributedCharacterIterator.

    Returns the beginning date of the 100-year period 2-digit years are interpreted as being within.

    Gets a copy of the date and time format symbols of this date format.

    int

    hashCode()

    Returns the hash code value for this SimpleDateFormat.

    Parses text from a string to produce a Date.

    void

    Sets the 100-year period 2-digit years will be interpreted as being in to begin on the date the user specifies.

    void

    Sets the date and time format symbols of this date format.

    Returns a localized pattern string describing this date format.

    toPattern()

    Returns a pattern string describing this date format.

    toString()

    Returns a string identifying this SimpleDateFormat, for debugging.

    Methods declared in class DateFormat

    format, format, getAvailableLocales, getCalendar, getDateInstance, getDateInstance, getDateInstance, getDateTimeInstance, getDateTimeInstance, getDateTimeInstance, getInstance, getNumberFormat, getTimeInstance, getTimeInstance, getTimeInstance, getTimeZone, isLenient, parse, parseObject, setCalendar, setLenient, setNumberFormat, setTimeZone

    Formats the given Object into a date-time string.

    Formats a Date into a date-time string.

    Returns an array of all locales for which the get*Instance methods of this class can return localized instances.

    Gets the calendar associated with this date/time formatter.

    Gets the date formatter with the default formatting style for the default FORMAT locale.

    Gets the date formatter with the given formatting style for the default FORMAT locale.

    Gets the date formatter with the given formatting style for the given locale.

    Gets the date/time formatter with the default formatting style for the default FORMAT locale.

    Gets the date/time formatter with the given date and time formatting styles for the default FORMAT locale.

    Gets the date/time formatter with the given formatting styles for the given locale.

    Get a default date/time formatter that uses the SHORT style for both the date and the time.

    Gets the number formatter which this date/time formatter uses to format and parse a time.

    Gets the time formatter with the default formatting style for the default FORMAT locale.

    Gets the time formatter with the given formatting style for the default FORMAT locale.

    Gets the time formatter with the given formatting style for the given locale.

    boolean

    Tell whether date/time parsing is to be lenient.

    Parses text from the beginning of the given string to produce a date.

    Parses text from a string to produce a Date.

    void

    Set the calendar to be used by this date format.

    void

    Specify whether or not date/time parsing is to be lenient.

    void

    Allows you to set the number formatter.

    void

    Sets the time zone for the calendar of this DateFormat object.

    Methods declared in class Format

    format, parseObject

    Formats an object to produce a string.

    Parses text from the beginning of the given string to produce an object.

    Methods declared in class Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • Constructor Details

    • SimpleDateFormat

    • SimpleDateFormat

    • SimpleDateFormat

    • SimpleDateFormat

  • Method Details

    • set2DigitYearStart

    • get2DigitYearStart

    • format

    • formatToCharacterIterator

    • parse

    • toPattern

    • toLocalizedPattern

    • applyPattern

    • applyLocalizedPattern

    • getDateFormatSymbols

    • setDateFormatSymbols

    • clone

    • hashCode

    • toString

    • equals