Class DateFormatterRegistrar
java.lang.Object
org.springframework.format.datetime.DateFormatterRegistrar
- All Implemented Interfaces:
- FormatterRegistrar
Configures basic date formatting for use with Spring, primarily for
 
DateTimeFormat declarations.
 Applies to fields of type Date, Calendar and long.
 Designed for direct instantiation but also exposes the static
 addDateConverters(ConverterRegistry) utility method for
 ad-hoc use against any ConverterRegistry instance.
- Since:
- 3.2
- Author:
- Phillip Webb
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidaddDateConverters(ConverterRegistry converterRegistry) Add date converters to the specified registry.voidregisterFormatters(FormatterRegistry registry) Register Formatters and Converters with a FormattingConversionService through a FormatterRegistry SPI.voidsetFormatter(DateFormatter dateFormatter) Set a global date formatter to register.
- 
Constructor Details- 
DateFormatterRegistrarpublic DateFormatterRegistrar()
 
- 
- 
Method Details- 
setFormatter
- 
registerFormattersDescription copied from interface:FormatterRegistrarRegister Formatters and Converters with a FormattingConversionService through a FormatterRegistry SPI.- Specified by:
- registerFormattersin interface- FormatterRegistrar
- Parameters:
- registry- the FormatterRegistry instance to use.
 
- 
addDateConvertersAdd date converters to the specified registry.- Parameters:
- converterRegistry- the registry of converters to add to
 
 
-