public class JodaTimeFormatterRegistrar extends java.lang.Object implements FormatterRegistrar
NOTE: Spring's Joda-Time support requires Joda-Time 2.x, as of Spring 4.0.
setDateStyle(java.lang.String)
setTimeStyle(java.lang.String)
setDateTimeStyle(java.lang.String)
setUseIsoFormat(boolean)
FormatterRegistrar.registerFormatters(org.springframework.format.FormatterRegistry)
DateFormatterRegistrar
DateTimeFormatterFactoryBean
JodaTimeFormatterRegistrar()
void
registerFormatters(FormatterRegistry registry)
setDateFormatter(DateTimeFormatter formatter)
setDateStyle(java.lang.String dateStyle)
LocalDate
setDateTimeFormatter(DateTimeFormatter formatter)
setDateTimeStyle(java.lang.String dateTimeStyle)
LocalDateTime
DateTime
Date
Calendar
setTimeFormatter(DateTimeFormatter formatter)
setTimeStyle(java.lang.String timeStyle)
LocalTime
setUseIsoFormat(boolean useIsoFormat)
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public JodaTimeFormatterRegistrar()
public void setUseIsoFormat(boolean useIsoFormat)
If set to "true", the "dateStyle", "timeStyle" and "dateTimeStyle" properties are effectively ignored.
public void setDateStyle(java.lang.String dateStyle)
DateTimeFormat.shortDate()
public void setTimeStyle(java.lang.String timeStyle)
DateTimeFormat.shortTime()
public void setDateTimeStyle(java.lang.String dateTimeStyle)
DateTimeFormat.shortDateTime()
public void setDateFormatter(DateTimeFormatter formatter)
This formatter will be used for the LocalDate type. When specified the dateStyle and useIsoFormat properties will be ignored.
dateStyle
useIsoFormat
formatter
setTimeFormatter(org.joda.time.format.DateTimeFormatter)
setDateTimeFormatter(org.joda.time.format.DateTimeFormatter)
public void setTimeFormatter(DateTimeFormatter formatter)
This formatter will be used for the LocalTime type. When specified the timeStyle and useIsoFormat properties will be ignored.
timeStyle
setDateFormatter(org.joda.time.format.DateTimeFormatter)
public void setDateTimeFormatter(DateTimeFormatter formatter)
This formatter will be used for LocalDateTime, ReadableInstant, Date and Calendar types. When specified the dateTimeStyle and useIsoFormat properties will be ignored.
ReadableInstant
dateTimeStyle
public void registerFormatters(FormatterRegistry registry)
FormatterRegistrar
registerFormatters
registry
Impressum und Datenschutz Copyright ©2018 eir.me