类 DateTimeFormatterRegistrar
java.lang.Object
cn.taketoday.format.datetime.standard.DateTimeFormatterRegistrar
- 所有已实现的接口:
FormatterRegistrar
Configures the JSR-310
java.time formatting system for use with Framework.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller, Phillip Webb
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidregisterFormatters(FormatterRegistry registry) Register Formatters and Converters with a FormattingConversionService through a FormatterRegistry SPI.voidsetDateFormatter(DateTimeFormatter formatter) Set the formatter that will be used for objects representing date values.voidsetDateStyle(FormatStyle dateStyle) Set the default format style ofLocalDateobjects.voidsetDateTimeFormatter(DateTimeFormatter formatter) Set the formatter that will be used for objects representing date and time values.voidsetDateTimeStyle(FormatStyle dateTimeStyle) Set the default format style ofLocalDateTimeobjects.voidsetTimeFormatter(DateTimeFormatter formatter) Set the formatter that will be used for objects representing time values.voidsetTimeStyle(FormatStyle timeStyle) Set the default format style ofLocalTimeobjects.voidsetUseIsoFormat(boolean useIsoFormat) Set whether standard ISO formatting should be applied to all date/time types.
-
构造器详细资料
-
DateTimeFormatterRegistrar
public DateTimeFormatterRegistrar()
-
-
方法详细资料
-
setUseIsoFormat
public void setUseIsoFormat(boolean useIsoFormat) Set whether standard ISO formatting should be applied to all date/time types. Default is "false" (no).If set to "true", the "dateStyle", "timeStyle" and "dateTimeStyle" properties are effectively ignored.
-
setDateStyle
Set the default format style ofLocalDateobjects. Default isFormatStyle.SHORT. -
setTimeStyle
Set the default format style ofLocalTimeobjects. Default isFormatStyle.SHORT. -
setDateTimeStyle
Set the default format style ofLocalDateTimeobjects. Default isFormatStyle.SHORT. -
setDateFormatter
Set the formatter that will be used for objects representing date values.This formatter will be used for the
LocalDatetype. When specified, thedateStyleanduseIsoFormatproperties will be ignored.- 参数:
formatter- the formatter to use- 另请参阅:
-
setTimeFormatter
Set the formatter that will be used for objects representing time values.This formatter will be used for the
LocalTimeandOffsetTimetypes. When specified, thetimeStyleanduseIsoFormatproperties will be ignored.- 参数:
formatter- the formatter to use- 另请参阅:
-
setDateTimeFormatter
Set the formatter that will be used for objects representing date and time values.This formatter will be used for
LocalDateTime,ZonedDateTimeandOffsetDateTimetypes. When specified, thedateTimeStyleanduseIsoFormatproperties will be ignored.- 参数:
formatter- the formatter to use- 另请参阅:
-
registerFormatters
从接口复制的说明:FormatterRegistrarRegister Formatters and Converters with a FormattingConversionService through a FormatterRegistry SPI.- 指定者:
registerFormatters在接口中FormatterRegistrar- 参数:
registry- the FormatterRegistry instance to use.
-