Example usage for Java java.text DateFormat fields, constructors, methods, implement or subclass
The text is from its open source code.
int | DATE_FIELD Useful constant for DATE field alignment. |
int | DAY_OF_WEEK_IN_MONTH_FIELD Useful constant for DAY_OF_WEEK_IN_MONTH field alignment. |
int | FULL Constant for full style pattern. |
int | LONG Constant for long style pattern. |
int | MEDIUM Constant for medium style pattern. |
int | SHORT Constant for short style pattern. |
int | DEFAULT Constant for default style pattern. |
DateFormat() Create a new date format. |
Object | clone() Overrides Cloneable |
boolean | equals(Object obj) Overrides equals |
String | format(Date date) Formats a Date into a date-time string. |
StringBuffer | format(Object obj, StringBuffer toAppendTo, FieldPosition fieldPosition) Formats the given Object into a date-time string. |
StringBuffer | format(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. |
Calendar | getCalendar() Gets the calendar associated with this date/time formatter. |
DateFormat | getDateInstance() Gets the date formatter with the default formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale. |
DateFormat | getDateInstance(int style) Gets the date formatter with the given formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale. |
DateFormat | getDateInstance(int style, Locale aLocale) Gets the date formatter with the given formatting style for the given locale. |
DateFormat | getDateTimeInstance(int dateStyle, int timeStyle, Locale aLocale) Gets the date/time formatter with the given formatting styles for the given locale. |
DateFormat | getDateTimeInstance() Gets the date/time formatter with the default formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale. |
DateFormat | getDateTimeInstance(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. |
DateFormat | getInstance() Get a default date/time formatter that uses the SHORT style for both the date and the time. |
NumberFormat | getNumberFormat() Gets the number formatter which this date/time formatter uses to format and parse a time. |
DateFormat | getTimeInstance(int style) Gets the time formatter with the given formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale. |
DateFormat | getTimeInstance() Gets the time formatter with the default formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale. |
DateFormat | getTimeInstance(int style, Locale aLocale) Gets the time formatter with the given formatting style for the given locale. |
TimeZone | getTimeZone() Gets the time zone. |
int | hashCode() Overrides hashCode |
boolean | isLenient() Tell whether date/time parsing is to be lenient. |
Date | parse(String source) Parses text from the beginning of the given string to produce a date. |
Date | parse(String source, ParsePosition pos) Parse a date/time string according to the given parse position. |
Object | parseObject(String source, ParsePosition pos) Parses text from a string to produce a Date . |
Object | parseObject(String source) Parses text from the beginning of the given string to produce an object. |
void | setCalendar(Calendar newCalendar) 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 | setTimeZone(TimeZone zone) Sets the time zone for the calendar of this DateFormat object. |
String | toString() Returns a string representation of the object. |