Package org.aoju.bus.core.date.formatter
Interface DatePrinter
- All Superinterfaces:
DateMotd
- All Known Implementing Classes:
FastDatePrinter,FormatBuilder
日期格式化输出接口
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
Modifier and TypeMethodDescriptionformat(long millis) 格式化日期表示的毫秒数<B extends Appendable>
Bformat(long millis, B buf) 将毫秒long值格式化为提供的Appendable格式化Calendar对象<B extends Appendable>
B将Calendar对象格式化为提供的Appendable日历上设置的时区仅用于调整时间偏移。使用GregorianCalendar格式化Date<B extends Appendable>
B使用GregorianCalendar将Date对象格式化为提供的AppendableMethods inherited from interface org.aoju.bus.core.date.formatter.DateMotd
getLocale, getPattern, getTimeZone
-
Method Details
-
format
-
format
-
format
-
format
将毫秒long值格式化为提供的Appendable- Type Parameters:
B- 附加类类型,通常是StringBuilder或StringBuffer- Parameters:
millis- 要格式化的毫秒值buf- 要格式化为的缓冲区- Returns:
- 指定的字符串缓冲区
-
format
使用GregorianCalendar将Date对象格式化为提供的Appendable- Type Parameters:
B- 附加类类型,通常是StringBuilder或StringBuffer- Parameters:
date- 格式的日期buf- 要格式化为的缓冲区- Returns:
- 指定的字符串缓冲区
-
format
将Calendar对象格式化为提供的Appendable日历上设置的时区仅用于调整时间偏移。解析器构造期间指定的时区将确定格式化字符串中使用的时区- Type Parameters:
B- 附加类类型,通常是StringBuilder或StringBuffer- Parameters:
calendar- 要格式化的日历buf- 要格式化为的缓冲区- Returns:
- 指定的字符串缓冲区
-