public final class TemporalAccessorPrinter extends Object implements Printer<TemporalAccessor>
Printer implementation for a JSR-310 TemporalAccessor,
using a DateTimeFormatter) (the contextual one, if available).DateTimeContextHolder.getFormatter(java.time.format.DateTimeFormatter, java.util.Locale),
DateTimeFormatter.format(java.time.temporal.TemporalAccessor)| 构造器和说明 |
|---|
TemporalAccessorPrinter(DateTimeFormatter formatter)
Create a new TemporalAccessorPrinter.
|
public TemporalAccessorPrinter(DateTimeFormatter formatter)
formatter - the base DateTimeFormatter instancepublic String print(TemporalAccessor partial, Locale locale)
Printerprint 在接口中 Printer<TemporalAccessor>partial - the instance to printlocale - the current user locale