Interface DatePrinter
- All Known Implementing Classes:
FastDateFormat,FastDatePrinter
Deprecated.
DatePrinter is the "missing" interface for the format methods of
DateFormat. You can obtain an object implementing this
interface by using one of the FastDateFormat factory methods.
Warning: Since binary compatible methods may be added to this interface in any release, developers are not expected to implement this interface.
Copied and modified from Apache Commons Lang.
- Since:
- Apache Commons Lang 3.2
-
Method Summary
Modifier and TypeMethodDescriptionformat(long millis) Deprecated.Formats a millisecondlongvalue.<B extends Appendable>
Bformat(long millis, B buf) Deprecated.Formats a millisecondlongvalue into the suppliedAppendable.format(Object obj, StringBuilder toAppendTo, FieldPosition pos) Deprecated.Formats aDate,CalendarorLong(milliseconds) object.Deprecated.Formats aCalendarobject.<B extends Appendable>
BDeprecated.Formats aCalendarobject into the suppliedAppendable.Deprecated.Formats aDateobject using aGregorianCalendar.<B extends Appendable>
BDeprecated.Formats aDateobject into the suppliedAppendableusing aGregorianCalendar.Deprecated.Gets the locale used by this printer.Deprecated.Gets the pattern used by this printer.Deprecated.Gets the time zone used by this printer.
-
Method Details
-
format
Deprecated.Formats a millisecond
longvalue.- Parameters:
millis- the millisecond value to format- Returns:
- the formatted string
- Since:
- 2.1
-
format
Deprecated.Formats a
Dateobject using aGregorianCalendar.- Parameters:
date- the date to format- Returns:
- the formatted string
-
format
Deprecated.Formats a
The TimeZone set on the Calendar is only used to adjust the time offset. The TimeZone specified during the construction of the Parser will determine the TimeZone used in the formatted string.Calendarobject.- Parameters:
calendar- the calendar to format.- Returns:
- the formatted string
-
format
Deprecated.Formats a millisecond
longvalue into the suppliedAppendable.- Type Parameters:
B- the Appendable class type, usually StringBuilder or StringBuffer.- Parameters:
millis- the millisecond value to formatbuf- the buffer to format into- Returns:
- the specified string buffer
- Since:
- 3.5
-
format
Deprecated.Formats a
Dateobject into the suppliedAppendableusing aGregorianCalendar.- Type Parameters:
B- the Appendable class type, usually StringBuilder or StringBuffer.- Parameters:
date- the date to formatbuf- the buffer to format into- Returns:
- the specified string buffer
- Since:
- 3.5
-
format
Deprecated.Formats a
The TimeZone set on the Calendar is only used to adjust the time offset. The TimeZone specified during the construction of the Parser will determine the TimeZone used in the formatted string.Calendarobject into the suppliedAppendable.- Type Parameters:
B- the Appendable class type, usually StringBuilder or StringBuffer.- Parameters:
calendar- the calendar to formatbuf- the buffer to format into- Returns:
- the specified string buffer
- Since:
- 3.5
-
getPattern
String getPattern()Deprecated.Gets the pattern used by this printer.
- Returns:
- the pattern,
SimpleDateFormatcompatible
-
getTimeZone
TimeZone getTimeZone()Deprecated.Gets the time zone used by this printer.
This zone is always used for
Dateprinting.- Returns:
- the time zone
-
getLocale
Locale getLocale()Deprecated.Gets the locale used by this printer.
- Returns:
- the locale
-
format
Deprecated.Formats a
Date,CalendarorLong(milliseconds) object.- Parameters:
obj- the object to formattoAppendTo- the buffer to append topos- the position - ignored- Returns:
- the buffer passed in
- See Also:
-
2.25.0, this class is assumed to be internal and planned to be removed in the next major release.