All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
SimpleDateFormat

  • Nested Class Summary

    Nested Classes

    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

    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

    protected

    Create a new date format.

  • Method Summary

    clone()

    boolean

    Compares the specified object with this DateFormat for equality.

    Formats the given Object into a date-time string.

    Formats a Date 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.

    getDateInstance(int style)

    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.

    getDateTimeInstance(int dateStyle, int timeStyle)

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

    getDateTimeInstance(int dateStyle, int timeStyle, Locale aLocale)

    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.

    getTimeInstance(int style)

    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.

    int

    hashCode()

    Returns the hash code for this DateFormat.

    boolean

    isLenient()

    Tell whether date/time parsing is to be lenient.

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

    Parse a date/time string according to the given parse position.

    Parses text from a string to produce a Date.

    void

    Set the calendar to be used by this date format.

    void

    setLenient(boolean lenient)

    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, formatToCharacterIterator, parseObject

    Formats an object to produce a string.

    Formats an Object producing an AttributedCharacterIterator.

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

    Methods declared in class Object

    finalize, getClass, notify, notifyAll, toString, 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.

    Returns a string representation of the object.

    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.

  • Field Details

    • calendar

    • numberFormat

    • ERA_FIELD

    • YEAR_FIELD

    • MONTH_FIELD

    • DATE_FIELD

    • HOUR_OF_DAY1_FIELD

    • HOUR_OF_DAY0_FIELD

    • MINUTE_FIELD

    • SECOND_FIELD

    • MILLISECOND_FIELD

    • DAY_OF_WEEK_FIELD

    • DAY_OF_YEAR_FIELD

    • DAY_OF_WEEK_IN_MONTH_FIELD

    • WEEK_OF_YEAR_FIELD

    • WEEK_OF_MONTH_FIELD

    • AM_PM_FIELD

    • HOUR1_FIELD

    • HOUR0_FIELD

    • TIMEZONE_FIELD

    • FULL

    • LONG

    • MEDIUM

    • SHORT

    • DEFAULT

  • Constructor Details

    • DateFormat

  • Method Details

    • format

    • format

    • format

    • parse

    • parse

    • parseObject

    • getTimeInstance

    • getTimeInstance

    • getTimeInstance

    • getDateInstance

    • getDateInstance

    • getDateInstance

    • getDateTimeInstance

    • getDateTimeInstance

    • getDateTimeInstance

    • getInstance

    • getAvailableLocales

    • setCalendar

    • getCalendar

    • setNumberFormat

    • getNumberFormat

    • setTimeZone

    • getTimeZone

    • setLenient

    • isLenient

    • hashCode

    • equals

    • clone