@Documented @Retention(value=RUNTIME) @Target(value=FIELD) public @interface CsvDate
Conversion to the following old-style types is supported:
DateCalendar (a GregorianCalendar is returned)GregorianCalendarXMLGregorianCalendarDateTimeTimestampConversion to the following TemporalAccessor-style
types is supported:
TemporalAccessor. If this interface is
used, the actual type returned is not defined.ChronoLocalDate. If this interface is used, the
actual type returned is LocalDate.LocalDateChronoLocalDateTime. If this interface is used,
the actual type returned is LocalDateTime.LocalDateTimeChronoZonedDateTime. If this interface is used,
the actual type returned is ZonedDateTime.ZonedDateTimeTemporal. If this interface is used, the
actual type returned is not defined.Era. If this interface is used, the actual type
returned is IsoEra.IsoEraDayOfWeekHijrahDateHijrahEraInstantJapaneseDateJapaneseEraLocalTimeMinguoDateMinguoEraMonthMonthDayOffsetDateTimeOffsetTimeThaiBuddhistDateThaiBuddhistEraYearYearMonthZoneOffsetThis annotation must be used with either CsvBindByName
or CsvBindByPosition, otherwise it is ignored.
| Modifier and Type | Optional Element and Description |
|---|---|
String |
chronology
The
Chronology that should be used for parsing. |
String |
value
A date/time format string.
|
String |
writeChronology
The
Chronology that should be used for
formatting. |
boolean |
writeChronologyEqualsReadChronology
Whether or not the same chronology string is used for writing as for
reading.
|
String |
writeFormat
A date/time format string.
|
boolean |
writeFormatEqualsReadFormat
Whether or not the same format string is used for writing as for reading.
|
public abstract String value
SimpleDateFormat.SimpleDateFormat(java.lang.String).
If it is applied to TemporalAccessor-based
dates and times, then this must be a string understood by
DateTimeFormatter.
The default value works for both styles and conforms with
ISO 8601. Locale
information, if specified, is gleaned from one of the other CSV-related
annotations and is used for conversion.public abstract boolean writeFormatEqualsReadFormat
value() is used for both reading and writing
and writeFormat() is ignored.public abstract String writeFormat
value(),
writeFormatEqualsReadFormat()public abstract String chronology
Chronology that should be used for parsing.
The value must be understood by
Chronology.of(String). The requisite ID for the
desired Chronology can usually be found in the Javadoc for the
getId() method of the specific implementation.
This value is only used for
TemporalAccessor-based fields. It is ignored
for old-style dates and times.
The default value specifies the ISO-8601 chronology. If a blank
string or empty string is specified, the chronology is
taken from the locale.
Chronology in usepublic abstract boolean writeChronologyEqualsReadChronology
chronology() is used for both reading and
writing and writeChronology() is ignored.public abstract String writeChronology
Chronology that should be used for
formatting.Chronology in usechronology(),
writeChronologyEqualsReadChronology()Copyright © 2019. All rights reserved.