Java java.text DateFormat fields, constructors, methods, implement or subclass

Example usage for Java java.text DateFormat fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.text DateFormat.

The text is from its open source code.

Subclass

java.text.DateFormat has subclasses.
Click this link to see all its subclasses.

Field

intDATE_FIELD
Useful constant for DATE field alignment.
intDAY_OF_WEEK_IN_MONTH_FIELD
Useful constant for DAY_OF_WEEK_IN_MONTH field alignment.
intFULL
Constant for full style pattern.
intLONG
Constant for long style pattern.
intMEDIUM
Constant for medium style pattern.
intSHORT
Constant for short style pattern.
intDEFAULT
Constant for default style pattern.

Constructor

DateFormat()
Create a new date format.

Method

Objectclone()
Overrides Cloneable
booleanequals(Object obj)
Overrides equals
Stringformat(Date date)
Formats a Date into a date-time string.
StringBufferformat(Object obj, StringBuffer toAppendTo, FieldPosition fieldPosition)
Formats the given Object into a date-time string.
StringBufferformat(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition)
Formats a Date into a date-time string.
Locale[]getAvailableLocales()
Returns an array of all locales for which the get*Instance methods of this class can return localized instances.
CalendargetCalendar()
Gets the calendar associated with this date/time formatter.
DateFormatgetDateInstance()
Gets the date formatter with the default formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale.
DateFormatgetDateInstance(int style)
Gets the date formatter with the given formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale.
DateFormatgetDateInstance(int style, Locale aLocale)
Gets the date formatter with the given formatting style for the given locale.
DateFormatgetDateTimeInstance(int dateStyle, int timeStyle, Locale aLocale)
Gets the date/time formatter with the given formatting styles for the given locale.
DateFormatgetDateTimeInstance()
Gets the date/time formatter with the default formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale.
DateFormatgetDateTimeInstance(int dateStyle, int timeStyle)
Gets the date/time formatter with the given date and time formatting styles for the default java.util.Locale.Category#FORMAT FORMAT locale.
DateFormatgetInstance()
Get a default date/time formatter that uses the SHORT style for both the date and the time.
NumberFormatgetNumberFormat()
Gets the number formatter which this date/time formatter uses to format and parse a time.
DateFormatgetTimeInstance(int style)
Gets the time formatter with the given formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale.
DateFormatgetTimeInstance()
Gets the time formatter with the default formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale.
DateFormatgetTimeInstance(int style, Locale aLocale)
Gets the time formatter with the given formatting style for the given locale.
TimeZonegetTimeZone()
Gets the time zone.
inthashCode()
Overrides hashCode
booleanisLenient()
Tell whether date/time parsing is to be lenient.
Dateparse(String source)
Parses text from the beginning of the given string to produce a date.
Dateparse(String source, ParsePosition pos)
Parse a date/time string according to the given parse position.
ObjectparseObject(String source, ParsePosition pos)
Parses text from a string to produce a Date.
ObjectparseObject(String source)
Parses text from the beginning of the given string to produce an object.
voidsetCalendar(Calendar newCalendar)
Set the calendar to be used by this date format.
voidsetLenient(boolean lenient)
Specify whether or not date/time parsing is to be lenient.
voidsetTimeZone(TimeZone zone)
Sets the time zone for the calendar of this DateFormat object.
StringtoString()
Returns a string representation of the object.