public class DateFormat extends Format
http://docs.oracle.com/javase/6/docs/api/java/text/DateFormat.html
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT
Deprecated.
Constant for default style (MEDIUM) parsing/formatting pattern.
|
static int |
FULL
Deprecated.
Constant for full style parsing/formatting pattern.
|
static int |
LONG
Deprecated.
Constant for long style parsing/formatting pattern.
|
static int |
MEDIUM
Deprecated.
Constant for medium style parsing/formatting pattern.
|
static int |
SHORT
Deprecated.
Constant for short style parsing/formatting pattern.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Deprecated.
|
boolean |
equals(Object obj)
Deprecated.
Indicates whether some other object is "equal to" this one.
|
String |
format(Date source)
Deprecated.
Format a given date.
|
String |
format(Object obj)
Deprecated.
Format a given object.
|
static DateFormat |
getDateInstance()
Deprecated.
Get a DateFormat instance with default style for date (SHORT).
|
static DateFormat |
getDateInstance(int style)
Deprecated.
Get a DateFormat instance that uses a given style for dates.
|
static DateFormat |
getDateTimeInstance(int dateStyle,
int timeStyle)
Deprecated.
Get a DateFormat instance that uses a given style for dates and times.
|
static DateFormat |
getInstance()
Deprecated.
Get a DateFormat instance with default style for date/time (SHORT/SHORT).
|
static DateFormat |
getTimeInstance()
Deprecated.
Get a DateFormat instance with default style for time (SHORT).
|
static DateFormat |
getTimeInstance(int style)
Deprecated.
Get a DateFormat instance that uses a given style for times.
|
int |
hashCode()
Deprecated.
Returns a hash code value for the object.
|
Date |
parse(String source)
Deprecated.
NOT IMPLEMENTED - use SimpleDateFormat for parsing instead.
|
Object |
parseObject(String source)
Deprecated.
NOT IMPLEMENTED - use SimpleDateFormat for parsing instead.
|
public static final int FULL
public static final int LONG
public static final int MEDIUM
public static final int SHORT
public static final int DEFAULT
public String format(Object obj) throws IllegalArgumentException
format
in class Format
obj
- object to be formatted to text.IllegalArgumentException
- of the source can not be formatted.public String format(Date source)
source
- date to be formatted.public Object parseObject(String source) throws ParseException
parseObject
in class Format
source
- document to be parsed.ParseException
- if the source could not be parsed.public Date parse(String source) throws ParseException
ParseException
public static final DateFormat getInstance()
public static final DateFormat getDateInstance()
public static final DateFormat getTimeInstance()
public static final DateFormat getDateInstance(int style)
public static final DateFormat getTimeInstance(int style)
public static final DateFormat getDateTimeInstance(int dateStyle, int timeStyle)
public int hashCode()
Object
public boolean equals(Object obj)
Object