public class FastDatePrinter extends SimpleDateBasic implements DatePrinter
FastDateParser,
Serialized Formlocale, pattern, timeZone| Constructor and Description |
|---|
FastDatePrinter(String pattern,
TimeZone timeZone,
Locale locale)
构造,内部使用
|
| Modifier and Type | Method and Description |
|---|---|
String |
format(Calendar calendar)
Formats a
Calendar object. |
<B extends Appendable> |
format(Calendar calendar,
B buf)
Formats a
Calendar object into the supplied Appendable. |
String |
format(Date date)
使用
GregorianCalendar 格式化 Date |
<B extends Appendable> |
format(Date date,
B buf)
Formats a
Date object into the supplied Appendable using a GregorianCalendar. |
String |
format(long millis)
格式化日期表示的毫秒数
|
<B extends Appendable> |
format(long millis,
B buf)
Formats a millisecond
long value into the supplied Appendable. |
int |
getMaxLengthEstimate()
估算生成的日期字符串长度
实际生成的字符串长度小于或等于此值 |
equals, getLocale, getPattern, getTimeZone, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetLocale, getPattern, getTimeZonepublic String format(Date date)
DatePrinterGregorianCalendar 格式化 Dateformat in interface DatePrinterdate - 日期 Datepublic String format(long millis)
DatePrinterformat in interface DatePrintermillis - 日期毫秒数public String format(Calendar calendar)
DatePrinter
Formats a Calendar object.
Calendarformat in interface DatePrintercalendar - Calendarpublic <B extends Appendable> B format(Date date, B buf)
DatePrinter
Formats a Date object into the supplied Appendable using a GregorianCalendar.
format in interface DatePrinterB - the Appendable class type, usually StringBuilder or StringBuffer.date - the date to formatbuf - the buffer to format intopublic <B extends Appendable> B format(long millis, B buf)
DatePrinter
Formats a millisecond long value into the supplied Appendable.
format in interface DatePrinterB - the Appendable class type, usually StringBuilder or StringBuffer.millis - the millisecond value to formatbuf - the buffer to format intopublic <B extends Appendable> B format(Calendar calendar, B buf)
DatePrinter
Formats a Calendar object into the supplied Appendable.
format in interface DatePrinterB - the Appendable class type, usually StringBuilder or StringBuffer.calendar - the calendar to formatbuf - the buffer to format intopublic int getMaxLengthEstimate()
Copyright © 2025. All rights reserved.