public interface DatePrinter
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.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.util.Calendar calendar)
Formats a
Calendar object. |
<B extends java.lang.Appendable> |
format(java.util.Calendar calendar,
B buf)
Formats a
Calendar object into the supplied Appendable . |
java.lang.StringBuffer |
format(java.util.Calendar calendar,
java.lang.StringBuffer buf)
Deprecated.
|
java.lang.String |
format(java.util.Date date)
Formats a
Date object using a GregorianCalendar . |
<B extends java.lang.Appendable> |
format(java.util.Date date,
B buf)
Formats a
Date object into the
supplied Appendable using a GregorianCalendar . |
java.lang.StringBuffer |
format(java.util.Date date,
java.lang.StringBuffer buf)
Deprecated.
Use {
format(Date, Appendable) . |
java.lang.String |
format(long millis)
Formats a millisecond
long value. |
<B extends java.lang.Appendable> |
format(long millis,
B buf)
Formats a millisecond
long value into the
supplied Appendable . |
java.lang.StringBuffer |
format(long millis,
java.lang.StringBuffer buf)
Deprecated.
Use {
format(long, Appendable) . |
java.lang.StringBuffer |
format(java.lang.Object obj,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
Formats a
Date , Calendar or
Long (milliseconds) object. |
java.util.Locale |
getLocale()
Gets the locale used by this printer.
|
java.lang.String |
getPattern()
Gets the pattern used by this printer.
|
java.util.TimeZone |
getTimeZone()
Gets the time zone used by this printer.
|
java.lang.String format(long millis)
Formats a millisecond long
value.
millis
- the millisecond value to formatjava.lang.String format(java.util.Date date)
Formats a Date
object using a GregorianCalendar
.
date
- the date to formatjava.lang.String format(java.util.Calendar calendar)
Formats a Calendar
object.
calendar
- the calendar to format.@Deprecated java.lang.StringBuffer format(long millis, java.lang.StringBuffer buf)
format(long, Appendable)
.Formats a millisecond long
value into the
supplied StringBuffer
.
millis
- the millisecond value to formatbuf
- the buffer to format into@Deprecated java.lang.StringBuffer format(java.util.Date date, java.lang.StringBuffer buf)
format(Date, Appendable)
.Formats a Date
object into the
supplied StringBuffer
using a GregorianCalendar
.
date
- the date to formatbuf
- the buffer to format into@Deprecated java.lang.StringBuffer format(java.util.Calendar calendar, java.lang.StringBuffer buf)
format(Calendar, Appendable)
.Formats a Calendar
object into the supplied StringBuffer
.
calendar
- the calendar to formatbuf
- the buffer to format into<B extends java.lang.Appendable> B format(long millis, B buf)
Formats a millisecond long
value into the
supplied Appendable
.
B
- the Appendable class type, usually StringBuilder or StringBuffer.millis
- the millisecond value to formatbuf
- the buffer to format into<B extends java.lang.Appendable> B format(java.util.Date date, B buf)
Formats a Date
object into the
supplied Appendable
using a GregorianCalendar
.
B
- the Appendable class type, usually StringBuilder or StringBuffer.date
- the date to formatbuf
- the buffer to format into<B extends java.lang.Appendable> B format(java.util.Calendar calendar, B buf)
Formats a Calendar
object into the supplied Appendable
.
B
- the Appendable class type, usually StringBuilder or StringBuffer.calendar
- the calendar to formatbuf
- the buffer to format intojava.lang.String getPattern()
Gets the pattern used by this printer.
SimpleDateFormat
compatiblejava.util.TimeZone getTimeZone()
Gets the time zone used by this printer.
This zone is always used for Date
printing.
java.util.Locale getLocale()
Gets the locale used by this printer.
java.lang.StringBuffer format(java.lang.Object obj, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
Formats a Date
, Calendar
or
Long
(milliseconds) object.
obj
- the object to formattoAppendTo
- the buffer to append topos
- the position - ignoredDateFormat.format(Object, StringBuffer, FieldPosition)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"