Class TemporalAccessorPrinter
java.lang.Object
org.springframework.format.datetime.standard.TemporalAccessorPrinter
- All Implemented Interfaces:
Printer<TemporalAccessor>
Printer
implementation for a JSR-310 TemporalAccessor
,
using a DateTimeFormatter
) (the contextual one, if available).- Since:
- 4.0
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
ConstructorDescriptionTemporalAccessorPrinter
(DateTimeFormatter formatter) Create a new TemporalAccessorPrinter. -
Method Summary
Modifier and TypeMethodDescriptionprint
(TemporalAccessor partial, Locale locale) Print the object of type T for display.
-
Constructor Details
-
TemporalAccessorPrinter
Create a new TemporalAccessorPrinter.- Parameters:
formatter
- the base DateTimeFormatter instance
-
-
Method Details
-
print
Description copied from interface:Printer
Print the object of type T for display.- Specified by:
print
in interfacePrinter<TemporalAccessor>
- Parameters:
partial
- the instance to printlocale
- the current user locale- Returns:
- the printed text string
-