public interface DatePrinter
DateFormat.| Modifier and Type | Method and Description |
|---|---|
String |
format(Calendar calendar)
Formats a
Calendar object. |
StringBuffer |
format(Calendar calendar,
StringBuffer buf)
Formats a
Calendar object into the supplied StringBuffer. |
String |
format(Date date)
Formats a
Date object using a GregorianCalendar. |
StringBuffer |
format(Date date,
StringBuffer buf)
Formats a
Date object into the supplied StringBuffer using a GregorianCalendar. |
String |
format(long millis)
Formats a millisecond
long value. |
StringBuffer |
format(long millis,
StringBuffer buf)
Formats a milliseond
long value into the supplied StringBuffer. |
StringBuffer |
format(Object obj,
StringBuffer toAppendTo,
FieldPosition pos)
Formats a
Date, Calendar or Long (milliseconds) object. |
Locale |
getLocale()
Gets the locale used by this printer.
|
String |
getPattern()
Gets the pattern used by this printer.
|
TimeZone |
getTimeZone()
Gets the time zone used by this printer.
|
String format(long millis)
long value.millis - the millisecond value to formatString format(Date date)
Date object using a GregorianCalendar.date - the date to formatString format(Calendar calendar)
Calendar object.calendar - the calendar to formatStringBuffer format(long millis, StringBuffer buf)
long value into the supplied StringBuffer.millis - the millisecond value to formatbuf - the buffer to format intoStringBuffer format(Date date, StringBuffer buf)
Date object into the supplied StringBuffer using a GregorianCalendar.date - the date to formatbuf - the buffer to format intoStringBuffer format(Calendar calendar, StringBuffer buf)
Calendar object into the supplied StringBuffer.calendar - the calendar to formatbuf - the buffer to format intoString getPattern()
SimpleDateFormat compatibleTimeZone getTimeZone()
This zone is always used for Date printing.
Locale getLocale()
StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos)
Date, Calendar or Long (milliseconds) object. See DateFormat.format(Object, StringBuffer, FieldPosition)obj - the object to formattoAppendTo - the buffer to append topos - the position - ignoredCopyright © 2022. All rights reserved.