org.springframework.format.annotation.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.
org.springframework.format.datetime.standard.DateTimeFormatterRegistrar , FormatterRegistrar#registerFormatters
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private DateFormatter |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | addDateConverters(ConverterRegistry
the registry of converters to add to converterRegistry)Add date converters to the specified registry. |
| public void | registerFormatters(FormatterRegistry
the FormatterRegistry instance to use. registry)Implements org. |
| public void |
| dateFormatter | back to summary |
|---|---|
| private DateFormatter dateFormatter
| |
| DateFormatterRegistrar | back to summary |
|---|---|
| public DateFormatterRegistrar() | |
| addDateConverters | back to summary |
|---|---|
| public static void addDateConverters(ConverterRegistry converterRegistry) Add date converters to the specified registry.
| |
| registerFormatters | back to summary |
|---|---|
| public void registerFormatters(FormatterRegistry registry) Implements org. Doc from org. Register Formatters and Converters with a FormattingConversionService through a FormatterRegistry SPI.
| |
| setFormatter | back to summary |
|---|---|
| public void setFormatter(DateFormatter dateFormatter) Set a global date formatter to register. If not specified, no general formatter for non-annotated
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Date | convert(Calendar
the source object to convert, which must be an instance of source)S (never null)Implements org. S to target type T.
|
| CalendarToDateConverter | back to summary |
|---|---|
| private CalendarToDateConverter() | |
| convert | back to summary |
|---|---|
| public Date convert(Calendar source) Implements org. Doc from org. Convert the source object of type | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Long | convert(Calendar
the source object to convert, which must be an instance of source)S (never null)Implements org. S to target type T.
|
| CalendarToLongConverter | back to summary |
|---|---|
| private CalendarToLongConverter() | |
| convert | back to summary |
|---|---|
| public Long convert(Calendar source) Implements org. Doc from org. Convert the source object of type | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Calendar | convert(Date
the source object to convert, which must be an instance of source)S (never null)Implements org. S to target type T.
|
| DateToCalendarConverter | back to summary |
|---|---|
| private DateToCalendarConverter() | |
| convert | back to summary |
|---|---|
| public Calendar convert(Date source) Implements org. Doc from org. Convert the source object of type | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Long | convert(Date
the source object to convert, which must be an instance of source)S (never null)Implements org. S to target type T.
|
| DateToLongConverter | back to summary |
|---|---|
| private DateToLongConverter() | |
| convert | back to summary |
|---|---|
| public Long convert(Date source) Implements org. Doc from org. Convert the source object of type | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Calendar | convert(Long
the source object to convert, which must be an instance of source)S (never null)Implements org. S to target type T.
|
| LongToCalendarConverter | back to summary |
|---|---|
| private LongToCalendarConverter() | |
| convert | back to summary |
|---|---|
| public Calendar convert(Long source) Implements org. Doc from org. Convert the source object of type | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Date | convert(Long
the source object to convert, which must be an instance of source)S (never null)Implements org. S to target type T.
|
| LongToDateConverter | back to summary |
|---|---|
| private LongToDateConverter() | |
| convert | back to summary |
|---|---|
| public Date convert(Long source) Implements org. Doc from org. Convert the source object of type | |