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, toStringpublic SimpleDateFormat(String pattern)
public String format(Date date)
SimpleDateFormatformat in class SimpleDateFormatdate - the Date to format.public Date parse(String datetime) throws ParseException
SimpleDateFormatparse in class SimpleDateFormatdatetime - the String to parse.ParseException - if the string is badly formatted.public void setTimeZone(TimeZone tz)