DateTimeDateFormatpublic class DateTimeDateFormat extends AbsoluteTimeDateFormat Formats a {@link Date} in the format "dd MMM yyyy HH:mm:ss,SSS" for example,
"06 Nov 1994 15:49:37,459". |
Fields Summary |
---|
private static final long | serialVersionUID | String[] | shortMonths |
Constructors Summary |
---|
public DateTimeDateFormat()
super();
shortMonths = new DateFormatSymbols().getShortMonths();
| public DateTimeDateFormat(TimeZone timeZone)
this();
setCalendar(Calendar.getInstance(timeZone));
|
Methods Summary |
---|
public java.lang.StringBuffer | format(java.util.Date date, java.lang.StringBuffer sbuf, java.text.FieldPosition fieldPosition)Appends to sbuf the date in the format "dd MMM yyyy
HH:mm:ss,SSS" for example, "06 Nov 1994 08:49:37,459".
calendar.setTime(date);
int day = calendar.get(Calendar.DAY_OF_MONTH);
if(day < 10)
sbuf.append('0");
sbuf.append(day);
sbuf.append(' ");
sbuf.append(shortMonths[calendar.get(Calendar.MONTH)]);
sbuf.append(' ");
int year = calendar.get(Calendar.YEAR);
sbuf.append(year);
sbuf.append(' ");
return super.format(date, sbuf, fieldPosition);
| public java.util.Date | parse(java.lang.String s, java.text.ParsePosition pos)This method does not do anything but return null .
return null;
|
|