@UsesJava8 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)| Constructor and Description |
|---|
TemporalAccessorPrinter(DateTimeFormatter formatter)
Create a new TemporalAccessorPrinter.
|
| Modifier and Type | Method and Description |
|---|---|
String |
print(TemporalAccessor partial,
Locale locale)
Print the object of type T for display.
|
public TemporalAccessorPrinter(DateTimeFormatter formatter)
formatter - the base DateTimeFormatter instancepublic String print(TemporalAccessor partial, Locale locale)
Printerprint in interface Printer<TemporalAccessor>partial - the instance to printlocale - the current user locale