StringConverter implementation for LocalDateTime values.
LocalDateStringConverter, LocalTimeStringConverter
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv LocalDateTimeStringConverter. |
| Access | Constructor and Description |
|---|---|
| public | LocalDateTimeStringConverter()
Create a |
| public | LocalDateTimeStringConverter(FormatStyle
The dateStyle, FormatStyle FormatStyle that will be used by the default
formatter and parser for the date. If null then FormatStyle#SHORT
will be used.The timeStyle)FormatStyle that will be used by the default
formatter and parser for the time. If null then FormatStyle#SHORT
will be used.Create a |
| public | LocalDateTimeStringConverter(DateTimeFormatter
An instance of formatter, DateTimeFormatter DateTimeFormatter which will be
used for formatting by the toString() method. If null then a default
formatter will be used.An instance of parser)DateTimeFormatter which will be used
for parsing by the fromString() method. This can be identical to
formatter. If null then formatter will be used, and if that is also null,
then a default parser will be used.Create a |
| public | LocalDateTimeStringConverter(FormatStyle
The dateStyle, FormatStyle FormatStyle that will be used by the default
formatter and parser for the date. If null then FormatStyle#SHORT
will be used.The timeStyle, Locale FormatStyle that will be used by the default
formatter and parser for the time. If null then FormatStyle#SHORT
will be used.The locale, Chronology Locale that will be used by the
default formatter and parser. If null then
Locale.getDefault(Locale.Category.FORMAT) will be used.The chronology)Chronology that will be used by the default
formatter and parser. If null then IsoChronology#INSTANCE will be
used.Create a |
| Modifier and Type | Method and Description |
|---|---|
| public LocalDateTime | fromString(String
the value)String to convertImplements abstract javafx. Converts the string provided into an object defined by the specific converter. |
| public String | toString(LocalDateTime
the object of type value)T to convertImplements abstract javafx. Converts the object provided into its string form. |
| ldtConverter | back to summary |
|---|---|
| pack-priv LocalDateTimeStringConverter. | |
| LocalDateTimeStringConverter | back to summary |
|---|---|
| public LocalDateTimeStringConverter() Create a This converter ensures symmetry between the toString() and
fromString() methods. Many of the default locale based patterns used by
| |
| LocalDateTimeStringConverter | back to summary |
|---|---|
| public LocalDateTimeStringConverter(FormatStyle dateStyle, FormatStyle timeStyle) Create a
| |
| LocalDateTimeStringConverter | back to summary |
|---|---|
| public LocalDateTimeStringConverter(DateTimeFormatter formatter, DateTimeFormatter parser) Create a For example, to use a fixed pattern for converting both ways:
Note that the formatter and parser can be created to handle non-default
Locale and Chronology as needed.
| |
| LocalDateTimeStringConverter | back to summary |
|---|---|
| public LocalDateTimeStringConverter(FormatStyle dateStyle, FormatStyle timeStyle, Locale locale, Chronology chronology) Create a
| |
| fromString | back to summary |
|---|---|
| public LocalDateTime fromString(String value) Implements abstract javafx. Doc from javafx. Converts the string provided into an object defined by the specific converter. Format of the string and type of the resulting object is defined by the specific converter.
| |
| toString | back to summary |
|---|---|
| public String toString(LocalDateTime value) Implements abstract javafx. Doc from javafx. Converts the object provided into its string form. Format of the returned string is defined by the specific converter.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Chronology | |
| pack-priv FormatStyle | |
| pack-priv DateTimeFormatter | |
| pack-priv Locale | |
| pack-priv DateTimeFormatter | |
| pack-priv FormatStyle | |
| private Class |
| Access | Constructor and Description |
|---|---|
| pack-priv | LdtConverter(Class<T> type, DateTimeFormatter formatter, DateTimeFormatter parser, FormatStyle dateStyle, FormatStyle timeStyle, Locale locale, Chronology chronology)
|
| Modifier and Type | Method and Description |
|---|---|
| private DateTimeFormatter | fixFourDigitYear(DateTimeFormatter formatter, FormatStyle dateStyle, FormatStyle timeStyle, Chronology chronology, Locale locale)
|
| public T | fromString(String
the text)String to convertImplements abstract javafx. Converts the string provided into an object defined by the specific converter. |
| private DateTimeFormatter | getDefaultFormatter()
Return a default |
| private DateTimeFormatter | |
| public String | toString(T
the object of type value)T to convertImplements abstract javafx. Converts the object provided into its string form. |
| chronology | back to summary |
|---|---|
| pack-priv Chronology chronology | |
| dateStyle | back to summary |
|---|---|
| pack-priv FormatStyle dateStyle | |
| formatter | back to summary |
|---|---|
| pack-priv DateTimeFormatter formatter | |
| locale | back to summary |
|---|---|
| pack-priv Locale locale | |
| parser | back to summary |
|---|---|
| pack-priv DateTimeFormatter parser | |
| timeStyle | back to summary |
|---|---|
| pack-priv FormatStyle timeStyle | |
| type | back to summary |
|---|---|
| private Class<T> type | |
| LdtConverter | back to summary |
|---|---|
| pack-priv LdtConverter(Class<T> type, DateTimeFormatter formatter, DateTimeFormatter parser, FormatStyle dateStyle, FormatStyle timeStyle, Locale locale, Chronology chronology) | |
| fixFourDigitYear | back to summary |
|---|---|
| private DateTimeFormatter fixFourDigitYear(DateTimeFormatter formatter, FormatStyle dateStyle, FormatStyle timeStyle, Chronology chronology, Locale locale) | |
| fromString | back to summary |
|---|---|
| public T fromString(String text) Implements abstract javafx. Doc from javafx. Converts the string provided into an object defined by the specific converter. Format of the string and type of the resulting object is defined by the specific converter.
| |
| getDefaultFormatter | back to summary |
|---|---|
| private DateTimeFormatter getDefaultFormatter() Return a default | |
| getDefaultParser | back to summary |
|---|---|
| private DateTimeFormatter getDefaultParser() | |
| toString | back to summary |
|---|---|
| public String toString(T value) Implements abstract javafx. Doc from javafx. Converts the object provided into its string form. Format of the returned string is defined by the specific converter. | |