public class SimpleDateFormat extends SimpleDateFormat
OPTION_PARSE_MISSING_TIME_ZONE_TO_DEFAULT, OPTION_PARSE_MISSING_TIME_ZONE_TO_GMT
Constructor and Description |
---|
SimpleDateFormat(String pattern) |
SimpleDateFormat(String pattern,
Locale locale) |
Modifier and Type | Method and Description |
---|---|
String |
format(Date date)
Format the specified date.
|
Date |
parse(String datetime)
Returns a java.util.Date value and is kept only
for compatibility with java.util.SimpleDateFormat.
|
void |
setTimeZone(TimeZone tz) |
fixLocaleFormat, format, format, format, getFormat, getLocale, hashCode, main, parse, parse, parseObject, parseTimeZoneOffset, setLocale, toLocaleFormat, toString
public SimpleDateFormat(String pattern)
public String format(Date date)
SimpleDateFormat
format
in class SimpleDateFormat
date
- the Date to format.public Date parse(String datetime) throws ParseException
SimpleDateFormat
parse
in class SimpleDateFormat
datetime
- the String to parse.ParseException
- if the string is badly formatted.public void setTimeZone(TimeZone tz)